If you are having problems using IIS Express 8 to host local Azure deployments after installing the Windows Azure SDK 1.7, you should probably continue reading this…
One of the new features of the Azure SDK 1.7 is the support for running local emulator with IIS Express 8 instead of the full IIS. This is supported for both Windows 7 and Windows 8.
At first when I tried this feature it simply didn’t wok. I previously had IIS Express 7.5 on my machine, and after installing the new SDK, I created a new web role, and when trying to run it locally, IIS Express did not fire up, and the browser opened showing it is unable to locate the requested address.
I then uninstalled the SDK, followed by uninstalling IIS Express. After making sure I don’t have any IIS Express “leftovers” in my machine, I reinstalled the Azure 1.7 SDK, making sure it also installed the new version of IIS Express.
Next, I opened the previously created project, and this time when I tried to run it, the following message appeared:
“The Windows Azure Emulator could not start the web server. The properties for this project specify that it should run on IIS Express, but no compatible version of IIS Express was found. To run this project, either install IIS Express 8 or higher, or change the ‘Use web server’ property for this project to ‘Local IIS web server’. See output window for more information.”
Since IIS Express 8 was successfully installed and it did work (VS 2010 SP1 was able to run web sites on it), it was time for the big guns – using reflector to find out what csrun.exe does. It seems that one of the first things csrun does is to create a COM object called Microsoft.IIS.VersionManager to check which version of IIS is installed on the machine. After opening the registry and finding the key, I discovered that I don’t have permission to read the key. Eureka!
Following this forum thread, I was able to add permissions to the key. After setting the permissions, I returned to Visual Studio, and this time I had no problem getting the emulator to use IIS Express 8 to host my web site. Problem solved!
Note: If you need to look for the registry key, it is located under HKEY_LOCAL_MACHINE\Software\Microsoft\Classes\Microsoft.IIS.VersionManager (make sure you also check permission on the second key, Microsoft.IIS.VersionManager.1)
Until the next bug…