gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 13:04:56 28 4
gpt4 key购买 nike

例如,我们只想捕获 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/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com