More to explore: configuration options unlocked in Windows Azure Web Sites

Locked Keyboard

Editor’s Note: This post was written by Erez Benari, Program Manager on the Windows Azure Web Sites Team

When managing a web site in Windows Azure Web Sites (WAWS), many options are configurable using the Azure Portal, and we are adding more options often. However, as you might already know, some of the real power options are available only by directly configuring a site’s web.config file. We’re sure you’ll be happy to hear that recently, we have exposed several new options and made them available in web.config!

If you’ve been managing web sites in IIS for a while, you probably know that IIS has a complex hierarchical system for managing the configuration. This system has configuration files for multiple levels, from the top-level machine.config and applicationHost.config files and all the way down to  site-specific and even folder-specific web.config files.
With Windows Azure Web Sites, we’ve tried to focus configuration changes just on web.config files by eliminate the complexity of dealing with the other files in the configuration hierarchy.

With a recent update to Azure Web Sites, we now allow developers several new options that have been unlocked for web.config. In the past, these options were locked down at the site level, which means you could not configure them (if you tried, the site would throw an error).

For example, a common request from Azure Web Sites customers was to be able to adjust the MIME types for dynamic and static content compression. On a standard default installation of IIS server, the master configuration file applicationHost.config file has the following configuration for the text/*, message/*, application/javascript, application/atom+xml and application/xaml+xml static MIME types only:

3718.blog post 1.28.png-550x526

On an IIS Server, this section would also be locked, so that you could not normally configure other or additional settings in a site-level web.config file.

On a standalone IIS Server, you could easily edit your applicationHost.config file and add settings to it, or unlock the httpCompression section and then add configuration options at the site-level.

With the changes to Azure Web Sites, we have unlocked that section, as well as several others, and now you can define your own options in your site’s web.config file. Due to small changes for the httpCompression section in Azure Web Sites, the syntax has been simplified:

6443.Screenshot (11).png-550x526

As you can see, there’s no need to specify the directory or scheme name, and you only need to list the MIME types for either Static types or Dynamic types.

For other sections that we have unlocked, the syntax is similar to the one used for regular IIS websites. The full list of sections is below. Each item links to an article on IIS.NET which describes that part of the configuration schema and how to configure it.

With these new settings now available, you now have a much higher flexibility with your configuration, and we hope this helps you build more productive web sites on Windows Azure Web Sites!