C# .NET - USE Remote debugger and Attach process to identify the blocking worker

Asked By balu Eswar on 16-May-12 12:10 PM
Earn up to 50 extra points for answering this tough question.
Hi All,

Please steps how to use remote debugger and attach process to identify the bloking worker process in production servers..

Kindly know the procedures to debug the same...

Thanks in advance,
Balu
[)ia6l0 iii replied to balu Eswar on 16-May-12 01:16 PM
Let me see If I can recollect all. Hope you have Visual studio 2008 or greater.  To attach to a remote process, you would have to rely on the debugger in your machine's Visual Studio. 

To begin with, you need the "Visual Studio Remote Debuggin Monitor" application on the actual web server (production webservers in your case). You can do a xCopy of this from the X:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger\x86 folder from the machine where this is installed. You will see files named "msvmon.exe" in this folder. Place this on the webserver under a known path. Also make sure, you have the right version of the msvmon utility copied - x86/x64/IA64. 

In the webserver, open the MSVmon.exe file that you just copied. You may get some warnings, if your firewall blocks remote debugging. Choose to let remote debugging. 

Then, in the MSVMon.exe interface, go to Tools- Options. You will a screen like below. Set "No authentication" and check the box that reads "Allow any user to debug". Note that this is a quick way of avoiding authentication issues. 

Remote debugging is now set on the web server. 

Now, open the Visual studio, and go to Tools - Attach to process. The processes dialog shows up. Change "Transport" options to "Remote - native with no authentication", and give the webserver name in the "Qualifier" text box. Under the processes listed, choose the worker process, and you should be good to go.

Hope this helps.
[)ia6l0 iii replied to balu Eswar on 16-May-12 01:32 PM
And this is how the options in MSVMon.exe would look.

kalpana aparnathi replied to balu Eswar on 16-May-12 02:09 PM
hi,

Use this referance article which gives remote debugging with process so please must read it.

http://msdn.microsoft.com/en-us/library/ff678494.aspx

Regards,
Somesh Yadav replied to balu Eswar on 17-May-12 12:25 AM

Here, have a look at this article: Remote IIS Debugging : Debug your ASP.NET Application which is hosted on "Remote IIS Server"
http://www.codeproject.com/Articles/38132/Remote-IIS-Debugging-Debug-your-ASP-NET-Applicatio
Jitendra Faye replied to balu Eswar on 17-May-12 12:40 AM
For this first you have to setup Remote debugging.

To enable remote debugging, you install or share remote debugging components on the remote computer that contains the application to be debugged.

If your computers are protected by a firewall, you must take extra steps to enable communication between the remote computer and the computer that is hosting Visual Studio.

For detailed information follow these links-


http://www.codeproject.com/Articles/38132/Remote-IIS-Debugging-Debug-your-ASP-NET-Applicatio

http://msdn.microsoft.com/en-us/library/ff678494.aspx

http://msdn.microsoft.com/en-us/library/bt727f1t.aspx

Hope this will help you.