如何调试现场服务器上的asp.net应用程序了 [英] How to debug an asp.net applicaiton on live server

查看:269
本文介绍了如何调试现场服务器上的asp.net应用程序了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个基于.NET Framework 1.1的一个老asp.net web应用程序,它已被部署到服务器住了很多年,现在我有我的桌面上只能用于直播网站,开发版本的一些问题精细。因此,我想附加一个远程调试器到实时现场和监控到底发生了什么活的服务器上,但我不知道该怎么做。

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.

您的帮助非常感谢!

推荐答案

嗯,是有可能的,但更多地参与。您将需要连接到运行网站(w3wp.exe的)IIS工作进程。我还没有做到,很多时候,我通常会尽量避免它,因为当你连接任何人都无法访问该网站。

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.

<一个href=\"http://www.$c$cproject.com/KB/aspnet/ProcessAttache.aspx\">http://www.$c$cproject.com/KB/aspnet/ProcessAttache.aspx

这篇文章是基于2.0不1.1,但它仍然应该给你如何做到这一点的想法。我想你将不得不在生产服务器上的Visual Studio。

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.

如果这是不可行的,你有机会获得code,你也可以尝试在应用某些点记录到一个文本文件中。我这样做非常有效地发现问题,这可以让你让网站运行正常,只是检查日志文件,你知道之后发生了问题。

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.

您可能想看看log4net的,这是一个免费的应用程序日志记录

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

好运气

这篇关于如何调试现场服务器上的asp.net应用程序了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆