Debugging Azure: VS unable to attach debugger to the IIS work process

There was an error attaching the debugger to the IIS worker process for URL '' for role instance 'deployment(21).WebRole.0'. Unable to start debugging on the web server. ’¦

It's always difficult to troubleshoot an issue by its symptoms. But sometimes you've gotta start somewhere.

Someone suggested to reinstall .Net 4 : I left that as the last resort.
Someone else suggested to do an aspnet_regiis : which I did and didn't fix it.

What helped me was this:

"The web role is probably crashing before Visual Studio has a chance to attach to IIS.

Okay that's a start.

The first thing that runs on my web role is either in the webrole.cs (which I didn't touch) or global.asax. And interestingly enough I found the following:

protected void Application_Start()

    // Create the tables
    CloudStorageAccount storageAccount =


And interestingly enough, I got my connection pointing to my production Azure Table and I didn't have internet connection at the time which cause it to break. The web role crashed at this point.

If you're having a similar issue, check out what you're launching on global.asax : most likely something funny happening there.

  1. Paras Doshi says:

    Thanks for the heads up!