.NET 2.0 中未处理的异常是否会重置应用程序?
我的公司有一个处理购物车结账流程的应用程序。该应用程序是用 VB.net 和 .NET 2.0 Framework 编写的。我们运行 IIS 6.0 作为 Web 服务器,并且我们认为具有出色的异常处理能力。对于那些我们无法弄清楚为什么会发生的异常,我们使用 Elmah 来处理它们,将它们打包并通过电子邮件发送给我们。
我们仍然看到大量未处理的异常,由 Elmah 处理。
我的问题是:这是一个网络上许多人同时使用的应用程序。如果存在未处理的异常(请注意,由 Elmah 处理),是否会重置应用程序,以便所有没有做任何顽皮行为的用户在发生这种情况时看到应用程序在他们面前爆炸?
My company has an application that handles shopping cart check out processes. The application is written in VB.net with the .NET 2.0 Framework. We are running IIS 6.0 as the web server and have, what we consider, excellent exception handling. For those exceptions that we can't figure out why they're happening, we use Elmah to handle them, package them up, and email them to us.
We still see a fair amount of unhandled exceptions, handled by Elmah.
My question is: This is an application that is used by many people on the web at the same time. If there is an unhandled exception (handled by Elmah, mind you), does this then reset the application so that all users who aren't doing anything naughty see the application blow up in front of them when this happens?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,Web 应用程序中未处理的异常只会导致当前请求崩溃。整个应用程序崩溃的唯一方法是,如果异常表示全局资源(如可用虚拟内存或数据库连接)出现问题,但即使如此,崩溃也不会由异常引起。每个正在执行的请求都会得到它自己的、孤立的异常。
No, unhandled exceptions in a web application will only crash the current request. The only way that the entire application would crash would be if the exception represented a problem with a global resource (like available virtual memory or a database connection) but even then the crash would not be caused by the exception. Each executing request gets it's own, isolated exception.
不,不会的。
每个请求都由不同的线程处理,因此,未处理的异常只会导致该线程终止。
No, it won't.
Each request is handled by a different thread, hence, an unhandled exception will only cause that thread to terminate.