开发者

asp.net application keeps running even after Application_Error finishes

开发者 https://www.devze.com 2023-01-02 11:06 出处:网络
the application keeps running even after Application_Error event is called, is there any wa开发者_如何学Goy to terminate the application in that event itselfThat would be bad design IMO.Unlike desktop

the application keeps running even after Application_Error event is called, is there any wa开发者_如何学Goy to terminate the application in that event itself


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消