asp.net - ASP.NET 蓝屏死机 (YSOD) 能否按需生成或捕获?

标签 asp.net error-reporting error-logging yellow-screen-of-death

例如,我们只想捕获 YSOD 输出以在错误报告电子邮件中使用,例如来自 Global.asax 错误处理程序。有没有办法利用内置的 ysod 生成器?

最佳答案

我会调查 ELMAH (Error Logging Modules and Handlers for ASP.NET) :

ELMAH (Error Logging Modules and Handlers) is an application-wide error logging facility that is completely pluggable. It can be dynamically added to a running ASP.NET web application, or even all ASP.NET web applications on a machine, without any need for re-compilation or re-deployment.

Once ELMAH has been dropped into a running web application and configured appropriately, you get the following facilities without changing a single line of your code:

  • Logging of nearly all unhandled exceptions.
  • A web page to remotely view the entire log of recoded exceptions.
  • A web page to remotely view the full details of any one logged exception.
  • In many cases, you can review the original yellow screen of death that ASP.NET generated for a given exception, even with customErrors mode turned off.
  • An e-mail notification of each error at the time it occurs.
  • An RSS feed of the last 15 errors from the log.

关于asp.net - ASP.NET 蓝屏死机 (YSOD) 能否按需生成或捕获?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/878628/

相关文章:

ASP.NET——如何使用来自 ASHX 处理程序的 XML 数据响应填充 TreeView 控件

asp.net - 如何根据角色显示或隐藏控件 - ASP.NET MVC 4 Razor

asp.net - 使用 jQuery 重新触发链接上的点击事件

c# - 为什么要序列化整个 HttpResponseMessage?

configuration - Jenkins:在电子邮件中构建矩阵作业错误?

php - mysqli_fetch_assoc()需要参数/调用成员函数bind_param()错误。如何获取并修复实际的mysql错误?

php - mysqli_fetch_assoc()需要参数/调用成员函数bind_param()错误。如何获取并修复实际的mysql错误?

cakephp - 尝试了一切,但无法关闭 CakePHP 中的错误

ios - 在 Iphone App 中使用 Logger 的最佳做法是什么

java - 用于多个应用程序的多个 log4j xml 文件