你如何登录您的ASP.NET应用程序错误(例外)? [英] How do you log errors (Exceptions) in your ASP.NET apps?

查看:261
本文介绍了你如何登录您的ASP.NET应用程序错误(例外)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找在ASP.NET应用程序记录错误的最好方式。
我希望能够当我的应用程序中发生的错误,以及有关异常和当前请求的详细信息接收电子邮件。

I'm looking for the best way to log errors in an ASP.NET application. I want to be able to receive emails when errors occurs in my application, with detailed information about the Exception and the current Request.

在我的公司,我们曾经有过自己的ErrorMailer,捕捉在Global.asax的Application_Error一切。这是确定,但不是很灵活,也可配置的。

In my company we used to have our own ErrorMailer, catching everything in the Global.asax Application_Error. It was "Ok" but not very flexible nor configurable.

我们最近swithed到NLOG。它更可配置,我们可以为错误定义不同的目标,它们进行过滤,缓冲它们(还没有尝试过)。这是一个很好的改善。

We swithed recently to NLog. It's much more configurable, we can define different targets for the errors, filter them, buffer them (not tried yet). It's a very good improvement.

但我发现最近有在为此.net框架整体命名空间:的 System.Web.Management 并可以在 healthMonitoring web.config中的部分。

But I discovered lately that there's a whole Namespace in the .Net framework for this purpose : System.Web.Management and it can be configured in the healthMonitoring section of web.config.

你有没有与.net健康监测工作?什么是你的错误记录解决方案?

Have you ever worked with .Net health monitoring? What is your solution for error logging?

谢谢,

文森特

推荐答案

我使用 ELMAH 。它有一些非常好的功能,这里是一个 $ C $的CProject 文章就可以了。我认为StackOverflow的团队使用ELMAH也!

I use elmah. It has some really nice features and here is a CodeProject article on it. I think the StackOverflow team uses elmah also!

这篇关于你如何登录您的ASP.NET应用程序错误(例外)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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