简体   繁体   English

应用程序池回收问题

[英]Application Pool recycle issue

I have one problem which I am not able to understand. 我有一个我无法理解的问题。

There are some unhandled exception in my asp.net application which I believe setting some of static variable in my class to null. 我的asp.net应用程序中有一些未处理的异常,我相信将类中的某些静态变量设置为null。

I believe this is because unhandled exception is recycling the application pool. 我相信这是因为未处理的异常正在回收应用程序池。

If I use Apllication_Error in global.asax , will that stop recycling of app pool?

If I use Application_Error in global.asax , will that stop recycling of app pool? 如果我在global.asax中使用Application_Error,那会停止回收应用程序池吗?

No, Application_Error might or might not even be reached, if Application Pool recycles due to hard crash. 不,如果由于严重崩溃而导致应用程序池回收,则可能会甚至可能不会达到Application_Error。

It seems that you do not have any logging framework in your application. 看来您的应用程序中没有任何日志记录框架。 One thing you can do at this point is to see the errors in Event Viewer. 此时,您可以做的一件事是在事件查看器中查看错误。

For example, 例如,

在此处输入图片说明

FYI : To view friendly error messages, you might want to add error logging to your application such as NLog, Log4Net or Elmah. 仅供参考 :要查看友好的错误消息,您可能想要向应用程序(例如NLog,Log4Net或Elmah)添加错误日志记录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM