Running Azure Web Role locally

There are a lot of good blogs explaining how to setup your Azure projects and how to convert your MVC web project (or create a new) to use Windows Azure. As part of this setup (Azure SDK installation), you will install Azure Emulators (Storage, Compute). These emulators are important part of your local development since it gives you an idea of how your application will behave once hosted in Azure Cloud platform.

You have a choice of running your MVC application and debugging in local (Click on MVC project, hit F5) or you could run and debug your Web Role project associated with your MVC project (Click on Azure Deployment Project that has the Web Role and hit F5)

If you have a setup like me, i.e., I am running a VM on my Mac Book Pro to host Windows 7 to do my Visual Studio work, and I have a named SQL Server instance, you might run into following error when you run your Web Role locally

Windows Azure Tools: Failed to initialize Windows Azure storage emulator. Unable to start Development Storage. Failed to start Storage Emulator: the SQL Server instance ‘localhost\SQLExpress’ could not be found.   Please configure the SQL Server instance for Storage Emulator using the ‘DSInit’ utility in the Windows Azure SDK.

Ok, this was a descriptive enough error message, and I promptly ran my Azure Command line and ran DSInit. That ended up giving me following error message.


If you had a default instance of SQL Server running, then I think running DSInit without any command line options would  have worked, a quick web search gave me all the options that DSInit supported (

With this new found information, I changed my command to:


Voila, it ran successfully and created the local database it required to run the emulator.

Now that I had my local storage emulator running successfully, I was able to hit F5 to debug and run the web role locally.

More Azure exploration ahead…tune in soon.





Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s