Asp .Net debugging in XP SP2

A person emailed me requesting me to blog step by step instructions on how to get Asp .Net working on XP SP2, and to check the status for each step.

I thought this would be a lengthy blog, but on second thoughts realize there isn’t anything very deep about Asp .Net debugging.

With SP2, you can run into two sets of problems with Asp .Net debugging – (a) Asp .Net deployment fails and (b) Debugging fails.

For the debugging, there are a number of blogs out there – my own blog lists how to get this going, and you have our Dev Lead’s blog at that also connects to Gregg’s and mine blogs. The most comprehensive place I think is

For Asp .Net deployment, there aren’t any issues particular to SP2 that I am aware of, but a simple search can find you common deployment errors and how to check the system to flush them out.

That leaves us with the problem of debugger errors with Asp .Net debugging on SP2.

First of all, make sure this is not an issue with deployment instead of debugger by running your project outside the debugger (Ctrl-F5 instead of F5).

Now, assuming that deployment works, debugging fails, confirm that this is asp .net specific by debugging another app (try attaching to notepad.exe, or your simple winforms app). For general debugger failure, refer to the links mentioned above.

Finally, if you have come this far, you are in a weird situation of specifically asp .net debugging failing. Open your application’s web.config file and make sure the debug attribute is indeed set as described at

Now if you are still failing, it has to be due to failure to attach to aspnet_wp.exe or w3wp.exe or inetinfo.exe. Deploy your app, open processes window (Tools->Debug Processes), check Show System Processes and Show processes in all sessions if necessary, and then attach to the aspnet_wp.exe or w3wp.exe or inetinfo.exe as a native process.

If this fails, you have a permission problem. At this point, there is no other explanation for it. Check the access permissions of your user.

If this worked, we are having auto-attach problems. This really should not happen and should be a rare case and there is no specific solution to offer, you can read this blog from Gregg to see what is going on – . I am not sure how many people manage to get to this stage – where everything above is working, just F5’ing the project fails. Do let me know if any of you guys ran into this specific issue, and what your underlying cause or fix turned out to be. I would try restarting IIS, restarting mdm (iisreset, net stop mdm, net start mdm).



Comments (9)

  1. Harun Akar says:


    If you install the Visual Studio .Net before installing IIS, you probably encounter with such a problem. There are a lot of different KB articles that must be applied to windows and .net framework settings. But the shortest way is to delete windows and reinstall it, install IIS first and install Visual Studio .Net.

  2. Andi says:


    I just have read an article in a local dotNet magazin ( that it is impossible to debug an ASP.NET application if you develop within a normal user account.

    As stated in the article the problem is that the ASP.NET worker process is creating some special NT-events that will be used for communication and those events will be created with NULL as parameter for the security settings. So as NULL means take the security token from the process running that results in the events being accessible only from the ASP.NET User and any administrators of the machine (as administrators have the system privilege to debug other user’s processes).

    This could be a problem if you try to debug your ASP.NET application while working as a normal user.

    A solution for this has also provided by the author of the article. This is a little console client that must be started with administrative rights and injects code into the ASP.NET worker process that will allow special users / groups to access the generated NT events….

    Hope that this will be fixed with VS 2005 !?!

    Best regards


  3. Tony Chow says:

    It is possible to debug ASP.NET using a non-admin user. Simply configure the worker process as the user debugging–that is, your own limited privilege account.

  4. Deeptanshu says:

    Hi Harun,

    I would disagree that the shortest solution for installing VS before IIS is to reinstall Windows, then IIS, then VS. That is a lot of effort. It is a lot more convenient to re-config your machine in the way VS install would have done it, it should not take more than some minutes. An excellent doc on IIS debugging problems is



  5. Rajesh.M says:


    When I run my page my contros like textbox,list box are not loaded could u please tell me what is the problem behind this


  6. Hi Rajesh,

    I have never encountered this scenario.

    Does the page not load or just these controls?

    Is it just this project or does every project have this problem?

    Is this only under the debugger or even when you Ctrl-F5?

    Which OS, what kind of project are you using?



  7. Channel 9 says:

    Thanks again peter, your help it’s very usseful (in half a day i advance more than in 2 days), i read the blogs and found that my situation is very scary :), 1