Fix problems with Visual Studio F5 debugging of ASP.NET applications on IIS7 Vista

********************************************************************** 
UPDATE – 4/8/2008

I've collected the various how-tos and gotchas about using Visual Studio 2005 and Visual Studio 2008 with IIS 7.0 applications into two detailed articles:
Using Visual Studio 2005 with IIS 7.0
Using Visual Studio 2008 with IIS 7.0
Be sure to check them out for detailed info on working with both local and remote IIS 7.0 applications on Windows Vista SP1 and Windows Server 2008 RTM, doing local and remote debugging, and other stuff.

**********************************************************************
UPDATE – 6/20/2007
A Visual Studio patch that fixes the Visual Studio F5 debugging of IIS7 applications on Windows Vista Home Premium and above has been released!  This patch solves the "An authentication error occurred while communicating with the web server.  Please see Help for assistance.", and "Debugging failed because integrated Windows authentication is not enabled.  Please see Help for assistance" errors, that until now had to be worked around using the instructions below.

This patch also enables customers using Windows Vista Home Premium customers to use Visual Studio F5 debugging, who were not able to use this feature at all previously because Windows Authentication was not available on Windows Vista Home Premium.

You can download the patch from connect here: Download.  Also see the KB article 937523 (it is being published today, so may not be available yet).

Thank you for your patience so far, and I hope that this resolves your problems.  If not, please let me know.

Thanks,

Mike
**********************************************************************

A number of people have been reporting problems when trying to debug their ASP.NET applications on Windows Vista with Visual Studio 2005 F5 debugging support.  There are a handful of posts about trying to get this to work in various ways … most of which are missing key information needed to *really* get it to work.

I am going to try and provide you with step-by-step instructions below, and explain the several tradeoffs that you may need to make along the way.

A little note about the purpose of Visual Studio's F5 debugging support:

Its designed to help you attach the debugger to the worker process running your ASP.NET application.  You can always manually attach the debugger via the Menu: Tools>Attach to Process … option, assuming you know what instance of W3WP.EXE worker process on your server the application is running in.  The F5 debugging mode figures this out for you, and starts a convinient browser window for you to play around with the app.  Other than that, it is the same as debugging it manually. 

If you are debugging from a remote machine, you will need to run the Visual Studio Debugging Monitor on the remote machine, and open the firewall so that Visual Studio can connect to the debugger (msvsmon.exe does this for you by default).  Then, you can still attach directly via the Attach to Process … dialog, by specifying the server's machine name.

So, the bottom line is, if you know which process you need to debug, you don't need F5 debugging to debug ASP.NET apps.  With that in mind, here is what it takes to get the convinient F5 Debugging working on Vista:

******************************************************************
NOTE: Be sure to get the Visual Studio 2005 SP1 update if you are running Visual Studio 2005 on Vista.  This update fixes a number of incompatibilities you may otherwise hit.  If you have issues installing SP1, please be sure to review Heath Stewart's blog entry at http://blogs.msdn.com/heaths/archive/2007/01/11/known-issues-with-visual-studio-2005-service-pack-1.aspx.
*******************************************************************

1) Run Visual Studio 2005 as Administrator

Unfortunately, Visual Studio 2005 SP1 still doesn't support the required elevation functionality to be able to do debugging when run by a LUA user.  I hope it will very soon – in the meantime, in order to enable debugging, you need to run it as Administrator:

Run Visual Studio 2005 as Administrator

2) Install required IIS components

IIS7 in Vista and Longhorn server has been completely modularized to reduce the security surface area and improve performance, and installs a pretty small set of features by default.  In order to enable F5 debugging, you will need at minimum the following components:

  1. ASP.NET
  2. Windows Authentication Module (Provides support for Windows authentication with NTLM and Kerberous)
  3. Metabase compatibility layer (Provides support for legacy IIS configuration APIs used by existing software to manage IIS.  Note that this is required to connect to your ASP.NET application from Visual Studio, even before you attempt debugging.)

Install them from Control Panel > Programs > Turn Windows Features on and off:

Install required IIS components for Visual Studio debugging

After doing this, you may get the following error if you attempt to debug:

Visual Studio wrong ASP.NET version warning

Always press No.  This message is incorrect, and is due to a change in how versioning is done for ASP.NET applications on IIS7 that is not being properly handled by Visual Studio 2005.

3) Enable Windows Authentication for your ASP.NET application

Visual Studio 2005 debugging requires the ASP.NET application to have Windows Authentication enabled.  This requirement also exists for Windows XP / Windows Server 2003.  To enable Windows Authentication, open the IIS Manager administration tool by running Start > type inetmgr in the search box, navigate to your application, choose the Authentication tab, and Enable Windows Authentication:

Enable Windows Authentication for the ASP.NET application

Note: If you have Anonymous / Forms authentication enabled for your application, leave it on.

4) Enable your ASP.NET application to provide debugging auto-attach support

At this point, if you press F5 and try to attach to your application, you may either see nothing or get the following error:

Authentication error when using Visual Studio F5 debugging

This is the dreaded error that frazzles most people
.  The unfortunate fact is, there is a bug in ASP.NET Integrated mode (the default ASP.NET mode for IIS7) that prevents authentication from taking place correctly for the debug auto-attach feature.  The bug manifests only in the following case:

  1. ASP.NET application is running in an application pool using Integrated mode (Default), and
  2. ASP.NET application has global.asax event handlers or custom modules that subscribe to pipeline notifications prior to AuthenticateRequest (not default) – so, BeginRequest, PostBeginRequest, and in some cases early in AuthenticateRequest.

The following workarounds are avaialble:

  1. Remove global.asax / modules causing this.  This is a farily bad option because they are the ones you want to debug a lot of the time :).
  2. Move the application to Classic mode.  This may be acceptable, but not ideal – especially if you are developing an application that takes advantage of Integrated mode specific features.  Even if you are not, you may sometime in the future so running your application in Integrated mode will help you make sure you are well positioned for it.
  3. Use the debug assistant module (below).  This is a hack I wrote that temporarily enables the debugging auto-attach to work correctly in integrated mode.  But, since you are not debugging your Vista site while its live on the internet (right? right?), you can temporarily install and use it while you are developing and debugging.

For how to move your application to Classic mode, you can consult one of the existing blog posts about this issue – for example, Rajiv's post here.

5) Enable the Debugging Assistant to enable F5 Debugging in Integrated mode

Like I said, don't put this module on a production system.  But, its entirely safe to use it for your development / test machine to help with F5 debugging.  Just make sure that you turn off debugging-related stuff, and remove this module before deploying in production as a general deployment practice.  Hopefully I havent scared you too much, since the module doesnt really do anything major – it just allows and tweaks the debug attach request to enable ASP.NET debug attach to work.  It does however disable authorization for requests mapped to the DebugHandler below (although the handler will require an authenticated Windows user).

Here is how to set this up on your machine:

  1. Download the Debug Assistant module (disclaimer: This module is not provided by Microsoft, and is not supported in any way.)
    ***********************************
    NOTE: If you are running on a 64bit OS, download the 64bit Debug Assistant.  It will replace the 32 bit version if you erroneously installed it on your 64bit machine – currently, using both on the same machine is not supported (but you can do it if you know how ๐Ÿ™‚ ).
    ***********************************
  2. Unzip to a local directory
  3. Right click on install.bat, and chose "Run as Administrator"
  4. Add the following in your application's web.config file:

<configuration>

      <system.webServer>

            <modules>

                  <add name="debugassistant" />

            </modules>

            <handlers>

                  <add name="DebugHandler" path="DebugAttach.aspx" verb="DEBUG" type="System.Web.HttpDebugHandler" />

            </handlers>

      </system.webServer>

      <system.web>

            <compilation debug="true" />

      </system.web>

</configuration>

This enables the Debug Assistant module in this application, and explicitly declares the DebugHandler handler (this is mandatory in order for debugging to work).  The debug=true directive is something you need to have also but VS 2005 will warn you about it if you dont.

Well, that's it, hope it helps.  Please let me know if this doesnt work for you, or you experience other issues.

200 Comments

  1. Anonymous

    Thanks Mike for posting this! Sure enough after removing global.asax code the app started debugging just fine. And the helper module works as well…

    You think there's going to be an official fix for this at some point? I certainly appreciate that you pulled this module together for us – as Bill said you rock!!!

    But given that the ASP.NET 2.0 bits are not supposed to change is this likely to get fixed by a .NET service pack in the future?

  2. Mike Volodarsky

    Glad to hear it works for you! It’s a nasty problem …

    We already have the fix and it will be in Vista SP1 / LHS next year, thats all I can say right now … its very unfortunate this happened though and everyone here feels real bad about it. Hopefully this workaround helps most people in the meantime.

    Thanks,

    Mike

  3. Anonymous

    I've set everything up in classical mode.

    Problem is, I'm doing URL Rewriting in a custom HTTP module. It _is_ working, but the path is as follows:

    http://localhost/myfile?id=10

    There's nothing that matches /myfile and I get a huge popup screen in Visual Studio with the error that should've been displayed in HTML. When I startup default.aspx and then typein /myfile?id=10 it works.

    Maybe you could lookin to it?! ๐Ÿ™‚

    And I really, really hope we can run in default (IIS7) mode in the future.

  4. Mike Volodarsky

    Dennis, I am not sure what your problem is.  Can you elaborate?  Are you failing to use F5 debugging, or having other application issues?  F5 debugging should just work in Classic mode provided you have done the prerequisite steps 1 – 3.

  5. Anonymous

    I am posting here because I am desparate. I have tried both iis and asp.net forums with no luck. I have a new laptop and I cannot get VS 2005 F5 debugging of asp.net aplications to work. I am running Windows XP SP2. I have run through the whole litany of possible causes: I am running as an adminstrator, integrated windows authen is enabled, debugging is enabled, HTTp Keep Alive is enabled, etc. The IIS logfile contains:

    #Software: Microsoft Internet Information Services 5.1
    #Version: 1.0
    #Date: 2007-01-05 21:22:04
    #Fields: time c-ip cs-method cs-uri-stem sc-status
    21:28:00 127.0.0.1 DEBUG /TestSite/DebugAttach.aspx 401
    21:28:43 127.0.0.1 DEBUG /TestSite/Default.aspx 401
    21:35:00 127.0.0.1 GET /TestSite/Default.aspx 200
    21:37:07 127.0.0.1 GET /favicon.ico 404
    21:44:37 127.0.0.1 DEBUG /TestSite/Default.aspx 400
    21:50:07 127.0.0.1 GET /favicon.ico 404

  6. Anonymous

    I’m getting the error when I try to debug:
    “Unable to start debugging on the web server. Could not start ASP.NET or ATL server debugging.”

    “Verify that ASP.NET or ATL Server is correctely installed on the server”.

    If I execute the app by CTRL + F5 I get the following error on the browser:
    “Service Unavailable” “HTTP Error 503. The service is unavailable”

    Please, help me
    Marco Alves.

  7. Anonymous

    I think that my problem occurs because your dll is 32 bits. But my processor is 64 bits. Can you post your dll in 64 bits or place the source code to me compile on my 64 bits machine? Thx in advance.

  8. Anonymous

    This is the message that event viewer shows to me:
    “The Module DLL ‘C:Windowssystem32inetsrvdebugassistant.dll’ could not be loaded due to a configuration problem. The current configuration only supports loading images built for a AMD64 processor architecture. The data field contains the error number. To learn more about this issue, including how to troubleshooting this kind of processor architecture mismatch error, see http://go.microsoft.com/fwlink/?LinkId=29349.”

    Source: IIS-W3SVC-WP
    Event ID 2282

  9. Mike Volodarsky

    Jim, can you post the response headers sent back in response to a DEBUG request to /TestSite/DebugAttach.aspx? You can use the WFETCH tool available from http://download.microsoft.com/download/7/8/2/782c25d3-0f90-4619-ba36-f0d8f351d398/iis60rkt.exe.

    The response headers should contain a WWW-Authenticate: Negotiate header. If they don’t, it may mean that you either don’t have Windows Authentication correctly configured or something is stripping the headers, which could result in this problem.

    Also, please consult http://support.microsoft.com/kb/306172 for more causes of debugging problems.

  10. rdmartin

    Thanks for posting this. After installing the debug assistant using install.bat, all web applications fail with the error “Service Unavailable. HTTP Error 503. The service is unavailable.” Even http://localhost fails with this error. Running iisreset and even rebooting my PC did not help. However, as soon as I uninstall it (uninstall.bat), things are working again (although debugging of course still does not work).

    Any ideas? I read and re-read your instructions and think I’m covering everything.

  11. Mike Volodarsky

    Rdmartin, this is a prime candidate for a 503 debugging session, using the techniques described here: troubleshooting service unavailable errors.

    My guess is you installed the 32bit package on a 64bit machine, or a 64bit package on the 32bit machine, and the DLL is failing to load.  This will be noted in the "Application" event log.  Also, if you have a mixed environment (32 bit WP using WOW64 on a 64 bit machine), some of your application pools may not work unless you modify your configuration to load the right version of the dll into each application pool using bitness preconditions.

  12. Mike Volodarsky

    Can you make sure that IIS scriptmaps contain an entry for ASPX mapped to the ASPNET_ISAPI.dll, and DEBUG verb is listed in the allowed verbs for the mapping? You can check in the “configuration” section of the InetMgr plugin for your application. You should be at minimum getting an ASP.NET exception with a 500 response or a 401 response when requesting debugattach.aspx with teh DEBUG verb. It doesnt appear that ASP.NET is executing given your response data.

  13. Anonymous

    Why can't I install the SP1 for Vista.

    The message is: "The upgrade patch cannot be installed by the Windows Installer service because the program to be updated may be missing or the upgrade patch may update a different version of the program.  Verify that the program exists on your computer and that you have the correct patch."

    I do have VS 2K5 and Vista… not sure what I'm missing.

  14. Anonymous

    By the way, if you do recieve the last message I reported, this just means that the regular SP1 (not the SP1 for Vista beta) isn’t installed yet. I forgot that I hadn’t added that to this development machine yet.

  15. Anonymous

    Hmmm… I had this working originally but today I came back to this as part of my installation and now I cannot get the debugger to fire up.

    Looking at the Freb log it looks like the debugassistant module is loading, but it continues on to fail with this:

    25. n n r  MODULE_SET_RESPONSE_ERROR_STATUS

    Warning ModuleName="global.asax", Notification="BEGIN_REQUEST", HttpStatus="401", HttpReason="Unauthorized", HttpSubStatus="0", ErrorCode="The operation completed successfully. (0x0)", ConfigExceptionInfo=""

    which looks pretty much like the error when the module isn't there at all. The module seems to fire though:

    10. n n ย—  NOTIFY_MODULE_START ModuleName="debugassistant", Notification="BEGIN_REQUEST", fIsPostNotification="false", fIsCompletion="false" 04:32:33.677

    11. n n ย—  NOTIFY_MODULE_END ModuleName="debugassistant", Notification="BEGIN_REQUEST", fIsPostNotificationEvent="false", NotificationStatus="NOTIFICATION_CONTINUE"

    Any ideas?

  16. Mike Volodarsky

    Rick, the debug assistant doesnt actually authenticate the request. If your custom global.asax code rejects the request with 401, you will not get the correct NTLM challenge and therefore not be able to debug. The debug assistant just makes sure that the mere presence of the global.asax event handler in BeginRequest does not cause the debug attach functionality to be broken.

    So, in your case, you may need to modify your global.asax code not to reject the debug request with a 401 … let me know if making this change works for you.

  17. Anonymous

    Mike, I followed the steps in detail as mentioned above, but I can not seem just to browse any ASP.NET 2.0 solutions on my site (with Integrated Mode, as Classic works fine), nevermind debugging.

    See my trace below:

    MODULE_SET_RESPONSE_ERROR_STATUS

    ModuleName="IsapiModule", Notification="EXECUTE_REQUEST_HANDLER", HttpStatus="500", HttpReason="Internal Server Error", HttpSubStatus="0", ErrorCode="The operation completed successfully. (0x0)", ConfigExceptionInfo=""

    Unfortunately I'm running out of options as I've removed and added IIS7 through vista, as well as running aspnet_regiss.exe alternatively to see if that makes a difference..

    Any help or direction would be appreciated..

    Bottom line, if I browse to any site (not debugging) in integrated mode, I get Server Application Unavailable.

    Regards

    Andries Olivier

  18. Mike Volodarsky

    Andries, it sounds like you have a lot going on ๐Ÿ™‚

    First, in Integrated mode, you shouldnt be using aspnet_isapi, but you are probably because you ran aspnet_regiis. Open you applicationHost.config, and delete all entries under the configuration section that have autogenerated-looking names containing the word "ABO".

    You should then stop seeing Server Application Unavailable errors – if you dont, check your eventlog for the exact error.

    Since this is a specific configuration issue, if you are still having trouble, please post to the IIS7 forums here: http://forums.iis.net/1038/ShowForum.aspx, and we will walk you through it.

  19. Anonymous

    Installing the debug assistent broke ALL my web applications (I got a 503 server error). Uninstalling it made everything work fine again.

  20. Mike Volodarsky

    That’s most likely because you installed the x86 package on an amd64 OS, or visa versa. Please use the right package for your OS, and try again.

    If it still fails, please check the “Application” eventlog to determine the exact cause of worker process AV, and post it here.

  21. Anonymous

    Mike, after doing all the above steps, I am still getting the error “ASP.NET or ATL not installed” error mentioned by Marco earlier in the comments. I am sure I installed the correct bit (32-bit) version. From what I could find from Event Log is “The Module DLL C:Windowssystem32inetsrvdebugassistant.dll failed to load. The data is the error.” I manually copied the DebugAssistant.dll file to the above mentioned path since it wasnt there earlier. But still the error seems to prevail.

  22. Anonymous

    Hello Mike,

    Excellent article thanks. I’ve got most of my web apps working with F5 now.

    However, there is one that still has problems. With this, I click F5 and get the following message:

    “Unable to start debugging on the web server. The web server is not configured correctly. See help for common configuration errors. Running the web page outside of the debugger may provide further information”

    Extra info:
    – Running the page outside of VS.NET works fine.
    – I can attach VS.NET to the W3WP.exe process and this works fine too.
    – Installing and using your Debug Assistant didn’t make any difference.
    – I am using Vista 64 and I can confirm that I installed the 64 bit version of your assistant
    – Other web apps do work OK. The problematic app works fine on IIS6 machines.

    Any ideas?

    Many thanks,

    Richard F

  23. Anonymous

    Exactly what I needed, thanks.

    One thing to add, if the install does not run for any reason, like you forgot to run as administrator, your IIS Application pool will be disabled due to the errors. You will see this in the System Event log. To re-enable, go to the IIS admin and select the application pool and re-enable it.

    Thanks again!

  24. Mike Volodarsky

    Marish,

    Please post the HRESULT located in the field of the event log entry details.

    Also, please run “depends” on the debugassistant dll to make sure that you are not missing any dependencies.

  25. Mike Volodarsky

    Richard,

    Please double check that you have configured the application appropriately for the debug assistant. There may be edge cases where the debugassistant is not able to enable debugging, that depend on your specific application configuration and ISAPI filters / modules you have loaded. These should be *very* rare.

    You may need to experiment with removing modules / global.asax to see if this makes it work.

    If you can make a request to /debugattach.aspx, and capture the request (headers and body), and send it to me using http://mvolo.com/blogs/serverside/contact.aspx, this may be useful in diagnosing the issue.

  26. Anonymous

    I was also getting the message:

    "Could not start ASP.NET or ATL Server debugging"

    I installed the 32-bit version to my retail 32-bit Vista, with run as administrator.

    Then, I started getting this message again:

    "Unable to start debugging on the web server.  An authentication error occurred while communicating with the web server."

    At this point, I feel like I'm going in circles with IIS7, VS2005 and Vista.  I don't know what else to do.

  27. Mike Volodarsky

    Chris,

    This seems to be working for most people. But, like I said above, in certain configurations you may have issues. We are working on a product fix that should become available soon.

    In the meantime, if you are sure you followed my instructions correctly, and you are still observing this behavior, please switch your application to Classic mode. Classic mode does not have this issue. Please see a link on how to do this in my post.

  28. Anonymous

    I've followed all your issue not the last one "Debug Assistant module" so in  VS2005 i create a ASP.NET web application f5 debug work fine.

    on the other hand i create  ASP.NET AJAX-Enabled web application (AJAX 1.0 installed) f5 debug isn't work returned message: Unable to start debugging on web server …

  29. Anonymous

    I'm having the same failure to load dll error as some others. I checked dependencies, and that seems to be ok. The eventdata in my eventlog is as follows —

    <EventData>

     <Data Name="ModuleDll">C:Windowssystem32inetsrvdebugassistant.dll</Data>

     <Binary>7E000000</Binary>

    </EventData>

    I've also tried classic mode, but that seems to break my web services….

  30. Mike Volodarsky

    Phil,

    Thanks for posting the event log. It sounds like the path to the module is incorrect. Can you make sure that C:Windowssystem32inetsrvdebugassistant.dll exists?

  31. Anonymous

    Great resource. keep it up!!Thanks a lot for interesting discussion, I found a lot of useful information!With the best regards!
    Artur

  32. Anonymous

    DotNetNuke FYI if anyone cares——

    For reasons well beyond my expertise, this solution does resolve the initial issue with debugging DotNetNuke (4.3.7 here), but the application will not launch correctly. What appears to be happening is it is skipping the global file. Also, I am not debugging the entire DotNetNuke application, just a module project set up under the BlankModule scenario.

    Switching the app pool resolved all issues.

    Thanks for your expertise!

  33. Anonymous

    Thanks guys for helping me out. The Dll didn't work for me, but I removed the "Application_AuthenticateRequest" event from the Global.asax (while developing) and everything works fine now.

  34. Anonymous

    Doe’s Windows Authentication only show up in the list if you have Business or Ultimate? I don’t see it in my list and I’m running Home Premium.

  35. Anonymous

    Appreciate for any help to below problem, I can't even get the Default Web Site to work after enabled ASP and ASP.NET on IIS7:

    Server Error in Application "Default Web Site"

    ——————————————————————————–

    HTTP Error 500.0 – Internal Server Error

    Description: Calling GetProcAddress on ISAPI filter "C:WindowsSystem32inetsrvasp.dll" failed

    Error Code: 0x8007007f

    Notification: Unknown

    Module: IIS Web Core

    Requested URL: http://localhost:80/

    Physical Path: C:inetpubwwwroot

    ———————–

  36. Mike Volodarsky

    Stephen,

    ASP.DLL is an ISAPI extension, not a filter.  You added it as a filter, and IIS is failing to obtain the filter entrypoint in this DLL, because, well, its not a filter ๐Ÿ™‚

    Remove the ISAPI filter entry you added, and you should be able to serve ASP pages just fine.

  37. Mike Volodarsky

    Rob,

    Unfortunately, Vista HOME does not provide the Windows authentication component that is necessary to do VS F5 debugging.

    We are aware of this problem, and are currently working with the VS team to provide a solution.

  38. Anonymous

    Hi Mike,

    “Windows Authentication” option is missing for all my IIS7 web sites. What exactly do I need to “ebnable”? I do have “Anonymous Authentication”, “ASP.NET Impersonation”, “Basic Authentication”, “Forms Authentication”, but no “Windows Authentication”.

  39. Anonymous

    Hi Mike,

    Although I’ve followed all your instructions, I simply can’t get it to work.Once I ran the install.bat file, I first got this error in the event viewer:

    “The Module DLL C:Windowssystem32inetsrvdebugassistant.dll failed to load. The data is the error.”

    As you suggested a couple of posts ago, I checked that the path to the debugassistant.dll file in the inetsrv folder existed and, as it didn’t, I copied the debugassistant.dll file missing. However, even after that it still doesn’t work. It gives me this error in visual studio:

    “Unable to start debugging on the web server. Could not start ASP.NET or ATL server debugging…”

    I have checked the event viewer and it doesn’t report any error about it anymore.
    I have gone through the process you explained a couple of times now and I still end up with the same error.

    Any Idea of what is still going wrong ?

  40. Anonymous

    Just did a clean install of Vista Ultimate with VS2005 along with all the necessary updates.  When installing the DebugAssistant, I was getting an error.  It turned out that I had to open up the security of windowssystem32inetsrvconfigapplicationHost.config file so that my account had rights to it even though it's an admin account.  Once I figured that out I'm able to debug my projects.  Thanks for putting this page together!

  41. Anonymous

    Thanks for this.

    I still get the message “An authentication error occured while communication with the webserver”, although I installed the debug assistant module and added it in the web.config. The only way i can debug my asp.net-app is to move it to the Classis-Pool in IIS7.

  42. Anonymous

    hi
    thanks for the post.
    one thing is i couldn’t find the Windows Authentication option in the windows features. please tell me the reason.
    thankx

  43. Anonymous

    Hi Mike,

    Thanks for the work you put into this. I do have a question regarding the system.webServer section in the web config. All modules in the system.web-httpModules section seem to be ignored until this section is processed. This caused code I had running in an http module with special handling of beginrequest to not run until after a page request had been processed. Is this by design or a side effect of the debughandler module? Let me know if I am not clear enough with my question and explanation.

  44. Anonymous

    the schema seems to not recognize any of the definitions that are put into it. Gives errors that “module” or “handlers” are not found.

  45. Anonymous

    Well, this looks like great info and seems to have helped lots of people but I guess my PC is more screwed up than most because I can't even run a web app in VS 2005 without debugging, let alone with.  Just get the "can't launch vs localhost web server" error.  ASP.Net apps run fine outside of VS via regular IIS.  Vista Business 6.0.6000.  Have VS SP1 and SP1 Update installed, as well as the 3 items mentioned above in IIS otions.  Logged in as administrator. Any ideas of how to fix this?

  46. Anonymous

    Jeff,

    Don’t know if this’ll help… but:

    If you create the project via the “file system” in VS, it’ll run via the VS web server. If you create it via HTTP, however, it’ll use the full-blown IIS instance you’re running anyway. Don’t know if there’s a way to switch between them once you’ve created the project, however!

    Try an IIS-hosted project in VS and see if that works?

    Kev

  47. Anonymous

    I fix my problem of permisions and compatibility over IIS on Vista and VS 2005 Installing the service pack 1 of VS 2005 and installing the follow Feature on IIS : IIS metabase IIS, Configuration and Compatibility.

  48. Anonymous

    hello mike,

    thank you a lot for your detailed explanations.

    Unfortuneately I had to give up finally, and so i am going to install the SP1 of VS2005.

    regards

    raimund

  49. Anonymous

    I have done all these steps and everything works – almost. But the debugger is highlighting the incorrect line – always one or two line ahead of where it really is. This is most frustrating. (I am using ASP Classic BTW) What more can I do short of going back to XP?

  50. Anonymous

    I don’t know what I’m doing wrong (if anything) I have followed the steps above and the ONLY way I can successfully start a debugging session is if I press F5 from the Web.Config file. In other words, unless the editor is currently in the Web.Config file in VS2005 I will get the “Unable to start debugging…. an authentication error” message box. Ideas?

  51. Anonymous

    Thanks for putting this together, saved me a lot of time!

    I'm still having some issues debugging classic ASP pages, the breakpoints are working fine in ASP.NET but not classic ASP.  I've verified enable server-side debugging for ASP in IIS is enabled, tried adding a DEBUG verb to the asp handler just in case, tried placing stop statements in the directly in the code, but nothing seems to work for classic ASP.  

    Any ideas?

  52. Anonymous

    When I try to enable the ASP.Net under ApplicationDevelopmentFeatures I get an error that not all features are installed and it remains unchecked.

  53. Anonymous

    I’m using Web Developer Express and I installed the DebugAssistant but still not working. I tried this because I cannot get debugging to work on HTTP (localhost:80) web sites. I am able to debug file based web sites. When I hit F5 in HTTP sites, I get the “unable to start debugging…” message that also says “underlying connection was closed. An unexpected error occurred on a send.” I have installed SP1 for Web Developer Express and the Vista update patch. I did answer “yes” when I got the “versioning” dialog and I don’t know how to undo that. I also suspect my current configuration may be causing this but I don’t know how to fix it. I have a “Local Area Connection 2” on the Microsoft Loopback adapter setup so I can have several VPCs talk to each other. Due to network policy (Vista is not allowed on our network for now), I’m also not connected to any network so there is no Internet access. IE is set to work in offline mode. Vista Ultimate is configured for workgroup and has never been part of a domain. In another post, I saw a suggestion to add the LsaDisableLoopbackCheck registry key set to 1. That didn’t help either. Any suggestions?

  54. Anonymous

    Anything for Vista Home Premium users? I can Start without Debugging now but am still unable to Debug.

    I don’t have the option for turning on Windows Authentication.

    – will

  55. Anonymous

    Hello —

    Thank you for the info you posted here.

    This is a really unfortunate bug. I just spent 4 hours chasing this and finally found this blog entry. It’s pretty dissapointing that it’s April 2007 and with a shiny new Vista / VS2005 combo the basic feature “F5” does not work and you have to dig, dig, dig to figure it out.

    I read that Vista SP1 due in late 2007. Is there any chance of getting a Windows hotfix for this? I don’t relish adding a module to my app that i have to remember to remove every single time I deploy to production.

    Can MS do a bit more to help us out here?

    I do appreciate all the info you’ve posted here — but I have to say this bug that breaks F5 still in April here is about as unacceptable as it gets.

  56. Anonymous

    I also have the same problem as many that I’m running Vista Home Premium and everything works fine apart from the debugging. No Windows Authentication option. Will there be a fix or other solutions available to get around this? (without buying business or ultimate). Thanks.

  57. Anonymous

    Thanks a lot for your blog.
    I have a simular problem; eg. it seems that SQL 2005 Analysis Services cannot work with Vista home premium as the item windows authentification is missing (it seems also that Reporting Services would not work either)
    Can you confirm?
    What is the solution to make SSAS working with windows vista premium?
    Thanks a lot for your help

  58. Anonymous

    Just want to say thanks. This worked great to access IIS from Express. I hope to see a fix for the windows authentication on home premium in SP1!

  59. Anonymous

    Thanks, Mike! You are a lifesaver! Just wanted to say your Debug Assistant (the 32-bit version, at least) is working perfectly in Orcas beta 1 as well!

  60. Anonymous

    Hi Mike,

    I did follow all the steps describe here. But even after I did Step 5 correctly, I get the same error shown in Step 4. I do not see any thing in event viewer too.

    Is there any reason why it will not work?

    Thanks in advance,
    Shrini

  61. Mike Volodarsky

    Shrinivas,

    What SKU of Vista are you running? Do you have Windows Authentication installed and enabled as above?

    Please also confirm that you are able to make normal requests to your application without error.

    Thanks,

    Mike

  62. Anonymous

    Vista SKU: Enterprise
    Windows Authentication enabled: Yes
    Can I make normal requests to your application without error: Yes

    I know this might look bit wiered but thats true. I had some issues with attaching process and debugging, but it seems to be fixed. I can atleast debug by attaching process. But it would be really nice to have F5.

  63. Anonymous

    Thank you very much for the information.
    Help me lot changing my assignment environment from window XP to Vista.

  64. Anonymous

    Om du kรถr Vista och utvecklar ASP.NET-lรถsningar har du kanske stรถtt pรฅ problem att debugga din applikation

  65. Anonymous

    Hi Mike
    Thanks for supporting this useful thread.

    Should I be able to debug through the Forms Authenticated section of my site? If I enable both Forms and Windows auth, then IIS manager complains I cant do both. It doesn’t seem to matter whether I use classic or native mode. I do have SP1.

    cheers

  66. Mike Volodarsky

    Dwight,

    Are you referring to missing the “Authentication” icon in the IIS7 Admin tool, or missing the “Security” tab in the legacy MMC console (the IIS6 one)? If the former, you need to install at least one authentication module from the setup menu …

    Thanks,

    Mike

  67. Anonymous

    I find that if you uninstall “.NET Framework 1.1″ from Vista, then the dialog box displaying ‘… is configured for use with ASP.NET 1.1.4322.537 …” is no longer prompt.

  68. Anonymous

    Hi Mike
    In february you informed us about Administration Authentacation is not available in Vista Home Premium edition, do we Have a work arround so we are able to debug under this version of vista.

  69. Anonymous

    Hi Mike, I installed the debug assistant, but now I get the following error:
    Unable to start debugging on the webserver. Could not start ASP.NET or ATL Server debugging. Verify that ASP.NET or ATL Server is correctly installed on the server.
    Could you Please let me know if there is work around for this problem.

  70. Anonymous

    after installing debuggassistant.dll, the IIS gives HTTP Error 503 service unavailable. Is there anything else I need to do after installing dll and updating web.config?

  71. Mike Volodarsky

    Philip,

    Unfortunately at this time Vista Home SKUs do not include Windows Authentication, which prevents F5 debugging from working. There is no workaround, although the Visual Studio team is working on the fix for the issue – please stay tuned for news on this shortly.

    In the meantime, you can attach directly to the worker process after making a request to your application, using my instructions at the beginning of the post.

    Thanks,

    Mike

  72. Mike Volodarsky

    Praveen,

    Can you examine your Windows “Application” event log to see the reason why your worker process is crashing?

    Also, if you are trying this on a 64bit machine, make sure you have a 64 bit version of the debug assistant, and visa versa for 32 bit machines. Mix-mode (running 32 bit worker processes on a 64 bit machine) is currently not supported by the install package.

    Thanks,

    Mike

  73. Anonymous

    Hi Mike,

    Thanks for the response. I worked all over the weekend to fix this, but with no success. ๐Ÿ™

    I am running on a 32 bit system.

    Here are the errors I got at different stages:

    Firstly, When I installed debug assistant and changing the config file as per your instructions: I got "Unable to start debugging on the webserver. Could not start ASP.NET or ATL Server debugging. Verify that ASP.NET or ATL Server is correctly installed on the server" error. Now, when I ran the app without debugging, I got "Service not available" error. I checked eventlog and saw "debuggassistant.dll failed to load. The date is error" message. I uninstalled debugassistant and installed again and still got the same message.

    Now, I un-installed both IIS and VS.net and installed again in the same order. After this, I installed debugassistant manually from the command prompt by copying commands from the installer. With this, I can see debugassistant in webprojects handler in IIS. but now it gives "authentication error" which was a previous error before installing debugassistant.

    I removed global asm from the project, but still got the same error.

    I really would like to get this done asap or else i have to revert back to Windows XP.

    Your help and guidence in this is very much appreciated.

    Thanks,

    Praveen

  74. Anonymous

    Hello Mike,

    I tried to attach aspnet_wp.exe to the debugger by using macro, but couldn’t find aspnet_wp.exe in the DTE.debugger.LocalProcesses. Do you think, this could be problem? In that case what could be the work around?

    Thanks,
    Praveen

  75. Anonymous

    this is releated to the script in installer:
    to make debugassistant install, I modified install batch file to
    cd
    copy UsersmyusernameDownloadsVisualStudioF5DebugAssistantdebugassistant.dll %windir%system32inetsrv /y

    this change made a successful copy to inetsrv folder.
    I think this will fix the error “could not start asp.net or ATL server debugging” as it will now will be able to find dll.

    Thanks,
    Praveen

  76. Mike Volodarsky

    Praveen, I am glad you got it to work. I am not sure from your post, was it a bug in the installer batch file that failed to copy the file to inetsrv?

    Thanks,

    Mike

  77. Anonymous

    Hi Mike,
    I am still not able to debug (I still get same authentication error), but above mentioned changes in cmd allowed me to successfully install dll.
    Thanks,
    Praveen

  78. Anonymous

    Hi Mike,

    OS: Vista Enterprise (VS 2005 with SP1, along with Vista Update)

    I installed your module. After that when I do a F5, I get the following error message. I’m trying to debug on my machine and not on remote machine.

    “Unable to Start Debugging on the Web server. Attaching to a process in different terminal server session is not supported on this computer. Try remote debugging to the machine and running the Microsoft Visual Studio Remote Debugger in the process’s session”.

    — Sai

  79. Anonymous

    VisualStudio2005 + WindowsVista ใง ASP.NET ใชใƒ—ใƒญใ‚ธใ‚งใ‚ฏใƒˆใ‚’ใƒ‡ใƒใƒƒใ‚ฏใ™ใ‚‹ๅ ดๅˆ DefaultPool ใงF5ใƒ‡ใƒใƒƒใ‚ฏใ‚’ใ—ใ‚ˆใ†ใจใ™ใ‚‹ใจๆจฉ้™ใŒไธ่ถณใ—ใฆใ„ใ‚‹ใจใ„ใ†ใƒ€ใ‚คใ‚ขใƒญใ‚ฐใŒ่กจ็คบใ•ใ‚Œใ€ใƒ‡ใƒใƒƒใ‚ฏใŒ้–‹ๅง‹ใงใใชใ„ๅ•้กŒใŒใ‚ใ‚Šใพใ—ใŸใ€‚ ใ“ใ‚Œใ‚’ไฟฎๆญฃใ™ใ‚‹ใƒ‘ใƒƒใƒใฎๆญฃๅผ็‰ˆใŒๅ…ฌ้–‹ใ•ใ‚Œใฆใ„ใพใ™ใ€‚ Fix problems with Visual Studio F5 debugging of ASP.NET applications on IIS7 Vista๏ผˆServer…

  80. Anonymous

    Just in time!  I had recently added ASP.NET AJAX to one of my projects (which adds a custom module), and when I tried to debug it on my Vista laptop, ran into these authentication problems.  The hotfix you pointed us to that just came out 3 days ago seems to work like a champ!

    Thank you very much!

  81. Anonymous

    hi

    I am using Visual Studio 2003 on vista home premium, it kip showing this error : Unable to start debugging on the web server. Debugging failed because integrated windows authentication is not enabled.

    wad shld i do?

    plz help..

    thx

  82. Anonymous

    THANK YOU. Your paged helped me fix this problem and was exactly what I needed. I’m still shocked as to why all of this was necessary and why I had to do all of this rigmarole. MS?

  83. Anonymous

    No errors, just no debugging available. No breakpoint hits the fan at all.
    After installing the hotfix still no action and debugging.

    Using vista ultimate

  84. Anonymous

    My colleague just figured out another way to make debugging going (Vista & VS 2005, ASP.NET) that doesn’t require “Run as” shortcut.
    Add “http://localhost” to your Trusted Sites in Internet Options->Security. That’s it! Weeeeeird!

  85. Anonymous

    For the message : An authentication error occurred while communicating with the web server, change pipeline mode to CLASSICAL.

  86. Anonymous

    I have 2 problems.
    1. How to start IIS 7 server on Vista home edition because “inetmgr” command is not regcognized.

    2. When i try to attach the app. to worker process in IDE i can’t find either aspnet_wp.exe or w3wp.exe (enabled both check boxes below). Is there any way to get these processes listed out in attach to process window?

  87. Anonymous

    on my system under “security” check box there is no “Windows Authentication”

    How to install / configure it?

    thanks

    oalexandrino at yahoo dot com dot br

  88. Anonymous

    Hi Mike
    A million thanks for posting the hotfix and download location.
    It worked perfect, unlike every other suggestion I’d run into.
    Thanks again

  89. Anonymous

    Hi all,

    Im having an error as well. My coding works fine on XP & VS 2005. but once i debug the same code on vista & VS 2005. oh well all hell break loose i guess.

    my code suppose to grab some info from the server n show it on IE but everytime i hit F5. wot i get is this “” The request failed with HTTP status 401: Unauthorized. “” and the IE keep processing non-stop but nuthing shows up on it.

    i have enable all those that u show. so basically i dunno wot else i do wrong or missing. i would really appreciate any help on this issue.

  90. Anonymous

    Hi Mike,
    Thanks for the hotfix. It solved my problem and now i can run asp.net application using my vista home premium.

    Regards,
    Mubashir Afroz.
    ===========

  91. Anonymous

    This is a great article. Thanks a lot for posting it. I purchased a $2000 laptop and spent another $600 to hook up to a dual monitor display, just to develop an asp.net 2.0 website on Vista Ultimate. To my dismay I found out how disparate are VS2005, IIS7 and Vista, and they simply refuse to work together. After strugging for 4 weeks, cursing myself for spending so much for nothing, I came across an article about the patch that will fix the debug issue. But it refused to get installed, and it appears that it could be installed only on Vista Home and not on Ultimate. Finally I stumbled upon this article, and manually configured IIS to enable “Windows Authentication”, and everything is hunky-dory now.