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.
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.
发布评论
评论(2)
嗯,是的,这是可能的,但涉及更多。您需要附加到运行网站的 IIS 工作进程 (w3wp.exe)。我不经常这样做,而且我通常会尽量避免这样做,因为当您连接时,没有人可以访问该网站。
这是一篇解释该过程的文章。
http://www.codeproject.com/KB/aspnet/ProcessAttache.aspx
本文基于 2.0 而不是 1.1,但它仍然应该让您了解如何操作。我想你必须在生产服务器上安装 Visual Studio。
如果这不可行并且您可以访问代码,您还可以尝试在应用程序中的某些点记录到文本文件。我已经非常有效地做到了这一点来发现问题,这使得您可以让网站正常运行,并且在知道问题发生后只需检查日志文件即可。
您可能想查看 log4net,这是一个免费的日志应用程序。
祝你好运
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
那么,为什么不尝试在服务器上启用跟踪呢?那么你可以在单独的页面中看到所有信息吗?要在 web.config 中启用:
然后在您的网站中加载 trace.axd 页面以查看页面级别数据。
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:
Then load the trace.axd page in your website to see the page level data.