简体   繁体   中英

asp.net application keeps running even after Application_Error finishes

即使在调用Application_Error事件之后,应用程序仍保持运行,是否有任何方法可以在该事件本身中终止应用程序

That would be bad design IMO. Unlike desktop applications, ASP.NET applications gracefully deal with unhandled exceptions by allowing the application to keep running. If it didn't, the website would no longer accept incoming requests, is that what you really want to do?

"After the Page_Error is called, the Application_Error sub is called. Here you can also log the error and redirect to another page . I won't explain anything else about it because it is basically the same as the Page_Error but happens to be at the application level rather than the page level."

Have a look at this web application error handling suggestions .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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