Can’t attach a Windows Azure Web Role to the debugger

March 1, 2012 at 8:02 am Leave a comment

Today I was making some minor modifications to a Windows Azure web role in a virtual machine when I ran into this error while trying to debug the application in Visual Studio 2010:


I have worked with the solution a couple of months ago without any problem at all so this stroke me as something quite odd. I reviewed the Application and System Windows Logs and there weren’t any errors at all so I decided to look for something more meaningful at the Windows Azure Platform Forums.

After a while I found this post describing the same error I was experiencing. As it turns out the cause of my problem was the location of the project files. This time they were in a shared folder mounted as network drive in my VMWare Workstation virtual machine.


By loading the project files from the network share the debugger isn’t able to properly locate the web.config and the error surfaces. It also applies to regular ASP .Net applications:


The main cause of this behavior is that by design UNC shares are non trusted and the network service account used by the azure emulator doesn’t have the proper permissions in the share. There is a workaround for this but it involves modifying the machine.config and even downgrading the target framework to 3.5. While these steps should be easy to implement, there’s always the risk they would interfere with your application once you deploy it to Windows Azure.

So, honoring the KISS principle, the way of get rid of this error is by moving your project files from the mounted share to the local drive in the VM. Once you do this all errors disappear and the web role debugs ok.


Entry filed under: Windows Azure. Tags: , , .

DSInit new location in Windows Azure SDK 1.6 DBFunktoids for BizTalk 2010

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

Trackback this post  |  Subscribe to the comments via RSS Feed

March 2012
« Feb   Jun »


%d bloggers like this: