People who use VS 2005 to debug ASP.NET applications running in IIS7 on Windows Vista can encounter one of the following error messages when they press F5 to auto-attach the debugger in the IDE:
- “An authentication error occurred while communicating with the web server.”
- “Debugging failed because integrated Windows authentication is not enabled.”
- “Authentication error occurred while communicating with the web server. Try disabling ‘Digest authentication'”
The above errors occur because of the way that VS 2005 looks up the Process ID of the IIS7 worker process that ASP.NET is running within. Specifically, when you use F5 to “auto attach” the debugger with Visual Studio it sends an HTTP request to ASP.NET using Windows Authentication to retrieve the worker process details. This works fine if you have Windows Authentication enabled on your web-server, and are using Windows Authentication as the primary authentication method for your web application. It runs into problems, though, in a couple of circumstances:
- If you have forms-auth enabled in ASP.NET and are running in “integrated mode” on the IIS7 web-server. This ends up blocking the process handler.
- If you don’t have the windows authentication module installed on your web-server (it is now an optional component).
- If you are running on Windows Vista Home (which doesn’t support the windows authentication module).
Patch Download Available
To fix the above cases which block F5 “auto-attaching” from working, we recently released a public hotfix for Visual Studio 2005. It addresses each of the above problem causes. You can download the hotfix patch for free here. Once you install it, your Visual Studio F5 auto-attach behavior will work just fine.
If you have any problems installing the patch or find that you still see issues after you install it, you’ll want to contact Microsoft product support for assistance and they’ll help debug it further. Calls to Microsoft Product Support are free if they are related to a product bug (either a QFE HotFix request or a product bug you are running into). You can find details on how to contact Microsoft product support on this page (it allows you to lookup the local phone number to use by country).
Microsoft, Hotfix, Patch, Updates, IIS7, .NET, ASP.NET, Visual Studio, Downloads, Troubleshooting