ASP.NET错误处理 [英] ASP.NET Error Handling

查看:158
本文介绍了ASP.NET错误处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的asp.net应用程序,我通常使用的Application_Error全局事件处理程序记录错误和用户重定向到一个用户友好的错误页面。

In my asp.net applications, I've typically used the Application_Error global event handler to log the error and redirect the user to a user-friendly error page.

不过,我看了一下 ELMAH 虽然这似乎有趣,的Application_Error似乎是一个简单的方法。

However, I have read about ELMAH and while that seems interesting, Application_Error seems like the simpler approach.

我读过的其他问题,人们,包括我自己,都建议的一种方式或其他。我不知道是如果有任何显著的好处是用一个比其他?为什么?

I've read other questions where people, including myself, have suggested one way or the other. What I'm wondering is if there is any significant benefit to using one over the other and why?

推荐答案

ELMAH是一个梦幻般的项目,我们用它来我们所有的ASP.NET应用程序。它不仅记录未处理的为你的错误,它抓住了整个的原始的网页,用户所看到的,里面包含了很多细节你。

Elmah is a fantastic project and we use it for all of our ASP.NET applications. Not only does it log unhandled errors for you, it grabs the entire original page that the user saw, which contains a lot of detail for you.

它具有电子邮件支持,RSS源(包括逐项和消化),并拥有一个迷人的控制台。

It has email support, RSS feeds (both itemized and digest) and has an attractive console.

有关3线配置和dll引用,我会说这是一个扣篮。

For 3 lines in config and a dll reference, I'd say that's a slam dunk.

这篇关于ASP.NET错误处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆