Freigeben über


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 https://weblogs.asp.net/andypennell/archive/2004/08/20/217933.aspx that also connects to Gregg's and mine blogs. The most comprehensive place I think is https://support.microsoft.com/kb/833977

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 https://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/html/vxtskdebugmodeinaspnetapplications.asp

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 - https://blogs.msdn.com/greggm/archive/2004/07/15/184271.aspx . 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

  • Anonymous
    November 18, 2004
    Hello,
    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.

  • Anonymous
    November 18, 2004
    Hi,

    I just have read an article in a local dotNet magazin (www.dotnetpro.de) 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

    andi

  • Anonymous
    November 19, 2004
    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.

  • Anonymous
    November 19, 2004
    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 http://www.gotdotnet.com/team/csharp/learn/whitepapers/howtosolvedebuggerproblems.doc

    Regards,
    D.V.

  • Anonymous
    November 23, 2004
    The comment has been removed

  • Anonymous
    November 24, 2004
    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?

    Thanks,
    D.V.

  • Anonymous
    June 04, 2008
    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

  • Anonymous
    June 16, 2009
    PingBack from http://workfromhomecareer.info/story.php?id=22867