Debug Deployed ASP.NET Application

The reason why I need to debug a deployed asp.net application is there are many things that are involved in a deployed situation and however are missing in the development environment like the impersonation debugging.

Another reason is once I need to develop an addon to one of our products which have been deployed in many places, and we only want to give this addon to whom they have paid for.

1. Compile your project and deploy including associated pdb files
2. Attach your project in visual studio to a remote process like IIS,
3. Here is the screen shot of Attach to processes

AttachProcess

II6 and IIS7 the ASP.NET process name is w3wp.exe, older IIS the name is aspnet_wp.exe, some time there is another process with the same name running, but to ensure the one you attach has Type : T-SQL, Managed,x86

4. When you debugging the impersonation, on development server, the runner is always the developer, but if it is attached to IIS, you will be able to see impersonation is happening.
5. Sometime you will see a message of your breakpoint: it is not going to be hit, because the code you are debugging is different from the attached process, so to ensure that the attached process is using the same version as the one you are debugging, this is only nuisance of debugging through process attaching

This entry was posted on Thursday, September 30th, 2010 at 1:43 am and is filed under ASP.NET. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

*