views:

379

answers:

2

I have an old asp.net web application based on .net framework 1.1, it has been deployed to live server for many years, right now I am having some issues with the live site only, the development version on my desktop works fine. So I am thinking about attach a remote debugger to the live site and monitor what happened exactly on live server, but I don't know how to do that.

I used remote debugger before, but that was used when I created new project on some development server in local LAN, and the source and project is actually on the remote server, I just attached remote debugger from my desktop to that server, it works fine. But I am not sure how to debug a application on live server.

Many thanks for your help!

+2  A: 

Well, why don't you try to enable tracing on the server? Then you can see all of the information in a separate page? To enable in the web.config:

<configuration>
   <system.web>
     <trace enabled="true" pageOutput="false" requestLimit="40" 
        localOnly="false"/>
   </system.web>
</configuration>

Then load the trace.axd page in your website to see the page level data.

Thanks a lot for the reply. I am not sure if only enable trace will give me enough information to figure out some timeout issue, I would like to know where and when those timeout happened. what exactly they are waiting for.Do you know how can I attach debugger to the live server? should I install VS.net 2003 components on live server first to enable debug? thanks.
+3  A: 

Well yes it is possible, but is more involved. You would need to attach to the IIS worker process running the website( w3wp.exe). I haven't done it very often, and I usually try to avoid it, because while you are attached no one can access the website.

Here is an article that explains the process.

http://www.codeproject.com/KB/aspnet/ProcessAttache.aspx

The article is based on 2.0 not 1.1, but it should still give you an idea of how to do it. I suppose you will have to have visual studio on the production server.

If this is not feasible and you have access to the code, you could also try logging to a text file at certain points in the application. I have done this very effectively to find issues, which allows you to let the website run as normal and just check the log file after you know the problem has occurred.

You may want to check out log4net, which is a free logging application.

Good luck

Thanks a lot for the help. I checked the article, you are right, that is not the best approach to monitor the live site. I will try add logging to the suspect part of code. Also I use DebugDiag get some information too, but it is hard for me to relate it to my code.