The other day I posted an entry about configuration files in Windows Azure, and I mentioned a strategy for being able to build a Web application that runs inside or outside of the cloud. I just wanted to follow up by mentioning the easiest way to test this; it’s one of those things that is so obvious you might not even think about it.
In a Windows Azure application, the “startup project” is set to the Cloud Service by default. So when you hit F5, the development fabric spins up, the service is packaged and deployed, a browser window opens to host your start page and the Visual Studio debugger attaches to the dev fabric process. But if you right-click your Web role, select “Set as StartUp Project” and then hit F5, Visual Studio will start a debugging session attached to the ASP.NET Web Development Server – in other words, outside of the development fabric. It’s a great way to test the dual-configuration approach I mentioned in my last post!