Search code examples
visual-studio-2010visual-studioazureiis-7visual-studio-debugging

visual studio error attaching debugger


I just set up my machine to code Windows Azure apps in Visual Studio 2010. I have a machine at work, which works fine. The machines are both 64-bit Windows 7. I run as administator at work. At home I installed most of the VS and .NET components as normal user, but I'm running everything now as administrator, because I assume there could be some errors correlating to that.

Creating a standard Azure project with one web role gives me this:

"there was an error attaching the debugger to the IIS worker process for URL http://127.0.0.1:5100/ for role instance 'xyz'...".

I searched Google 24 hours and tried most of the solutions, but none worked for me:

http://127.0.0.1:5100/debugattach.aspx 
Status code=403 (Forbidden) Protocol version=1.1 Cached=False
Content-Length=53 Content-Type=text/html; charset=utf-8 
Date=Fri, 19 Aug 2011 20:16:48 GMT Server=Microsoft-IIS/7.5
X-Powered-By=ASP.NET
/debugattach.aspx-application debugging not activated.

When I comment out the Sites-Tag in the ServiceDefinition.csdef I get the following error:

"unrecognized attribute 'targetframework'. note that attribute names are case-sensitive"

Here I also tried most solutions to be found on the internet:

  • setting the right .NET-Framework version in IIS-Manager (all application pools are set to 4.0, when starting the project, the error page shows framework 2.0 though, where can I change it?)
  • installing the newest .NET-Framework, I have 4.0.30319

None of them work.

If you have any advice, I will try it and list my result in this post.


Solution

  • The first question to ask is which version of Windows 7 are you running at home? I'm going to go out on a limb and guess that it's Home Premium and at work you run Professional.

    The catch is that with Home Premium (an lesser edtions) you don't have the option to install the necessary components to be able to debug in IIS. To confirm this, on your work computer go to Control Panel -> Programs and Features -> "Turn Windows features on or off" and have a look under the IIS option. You'll see more there than you do at home.

    I have not found anywhere in the MS documentation on the differences between various editions of Windows 7 that this is the case. I'd be happy for someone to correct me on this though.

    To get around this issue is while running at home to change the project to run with Visual Studio Development Server (right click your project -> Properties -> Web) and make sure that you change it back to using IIS before you check in your code.

    Or you can buy an anytime upgrade for windows to Professional.