Publish to Directly To Azure Web Sites With WebMatrix

WebMatrix is one of my favorite development tools because it really allows me to focus on what I love to do most, build modern web clients. It is a free Web IDE available from Microsoft and today they released version 3 for general availability.

There are several new features added to the latest bits. Today I want to walk you through how to directly publish to Azure Web Sites.

If you are not familiar with Azure Web Sites there are many articles available explaining them in more detail. Basically they serve the same role a classic shared web site has in traditional web hosting, except they are hosted n the cloud. You can find out more about pricing,, but for a test domain it is free, a custom domain will cost you around $15 a month and a dedicated site ~$75 a month.

You could always manually publish your web site to your Azure Web Site or thanks to WebMatrix, do it the easy way. I am going to walk you through a very simple process, where I publish the bakery web site example.

When you first open the latest WebMatrix you will be prompted for your Azure credentials. If you do not have an Azure account you can skip this step, but let's face it if you are reading this post you most likely have an account already LOL.

If you skip this prompt you can always sign in later using the login at the top-right corner of the application or during the publish process.

Once you have your web site and are ready to publish it just hit the Publish button located on the main ribbon bar. It is located on the Home ribbon. This will start the site publishing wizard.

If you are familiar with the WebMatrix publishing wizard you will notice two new options for the Azure Web Sites. The first lets you create a new web site, the second lets you choose an existing web site you have already provisioned.

If you want to use an existing site you will next see a list of sites to choose and continue down the main path.

If you want a new web site the publishing wizard provisions the site and tells you what the unique domain is. This will be some long domain combination with several levels of sub-domains. You can more or less ignore this domain before its over.

The next step will check compatibility concerns for your web site with the Azure Web Site. In this step it will let you know what needs to be 'setup' in your web site to make the site work. I would also assume it will let you know if there are any real issues, but I have not run across any of these at this point.

In the next step you will be prompted to provide a custom domain. This is where you can decide something, less 'Guid', to access your web site.

Next it will evaluate your web site to determine what files need to be publish. Similar to a source code check in you can decide what files get published and don't. If you notice in my example it will also take care of the database file.

Next you will see a publishing notice at the bottom of the WebMatrix window.

Once the publishing process is complete the notification message will change to let you know. There is a link included so you can open your newly published site in the browser to test it out.

As you can see publishing from WebMatrix to Azure Web Sites is very friction free. I hope you find it a useful feature. And in case you are wondering I already snagged the 'bakery' sub-domain,!

Share This Article With Your Friends!