How to debug an asp.net application on a real server

I have an old asp.net web application based on the .net framework 1.1, it has been deployed on the server for many years, right now I have some problems only with a live site, the development version on my desktop is good. Therefore, I’m thinking about connecting a remote debugger to the current site and tracking what happened on the real server, but I don’t know how to do it.

I used the remote debugger before, but it was used when I created a new project on some development server on the local LAN, and the source and the project are actually on the remote server, I just connected the remote debugger from my desktop to this one server, it works great. But I'm not sure how to debug the application on a real server.

Many thanks for your help!

+6
remote-debugging
source share
2 answers

Well, yes, perhaps, but more actively. You will need to connect to the IIS workflow with the website (w3wp.exe). I have not done this very often, and I usually try to avoid it, because as long as you are attached, no one can access the website.

Here is an article explaining the process.

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

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

If this is not possible and you have access to the code, you can also try registering in a text file at specific points in the application. I did this very effectively to find problems that allow you to start the site as usual and just check the log file after you know that the problem has occurred.

You can check log4net, which is a free logging application.

Good luck.

+6
source share

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

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

Then upload the trace.axd page to your website to view page level data.

+6
source share

All Articles