web.config 中的 CustomError 页面未触发 Application_Error 事件

发布于 2024-09-19 16:21:19 字数 273 浏览 1 评论 0原文

我有一个 asp.net 网站,并且在我的 global.asax 的 Application_Error 事件中有一段代码,用于将错误详细信息(堆栈跟踪等)作为电子邮件发送到我的电子邮件 ID。此外,我在我的中设置了自定义错误页面web.config。我以发布模式发布了该网站并部署到生产环境。当我访问该网站时,我遇到了一些错误,并显示了我在 web.config 中设置的自定义错误页面。但我从未收到过有关该问题的电子邮件错误。我确信电子邮件服务器正在生产服务器中工作。我的应用程序中有电子邮件发送代码,运行良好。有什么想法吗?

I have an asp.net website and i have a block of code in my global.asax's Application_Error event to send the error details(stack trace etc..) as an email to my email id.Also i have Custom error page set in my web.config.I published the website in release mode and deployed to production.When i access the site,I got some errors and i was shown the custom error page i set in my web.config.But i never received an email about the error.I am sure the email server is working in production server.I have email sending code in my app which works well. Any thoughts ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

錯遇了你 2024-09-26 16:21:19

我更喜欢使用 http://code.google.com/p/elmah/ 进行错误日志记录和报告。

I prefer using http://code.google.com/p/elmah/ for error logging and reporting.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文