Null Exception Upon First Launch - Resolved

Nov 13, 2011 at 9:37 PM

Hello guys, thought I'd share. If you have IIS Express installed, you might get a Null exception on Line 120 of WebRole.cs. This is because the ServerManager class used there defaults to your IIS Express and doesn't find your site which is deployed to plain IIS by the Azure Emulator. The solution is simple: change the line to this.

using (var server = ServerManager.OpenRemote(Environment

.MachineName.ToLower())) 

 

Cheers! Balint