ASP.NET MVC异常日志记录
问题描述:
我刚接手,有很多的代码了下方例外刚好赶上和Console.Write(XXX)有一个应用程序。ASP.NET MVC异常日志记录
我想改变这种做法,我有一个简单的日志审查凡事都有Console.write()现在。
什么是让这个设置在asp.net mvc的有一个文件来查看IIS服务器上的最简单的方法。
try
{
SmtpClient c = new SmtpClient("mail.xxx.org");
c.Send(msg);
}
catch (Exception ex)
{
Console.Write(ex.Message.ToString());
}
还有其他类似的问题:ASP.NET MVC。请参阅... http://*.com/questions/1032373/asp-net-mvc-exception-logging-combined-with-error-handling – 2009-08-06 05:32:25
此外,[本博客](http://blog.dantup。 me.uk/2009/04/aspnet-mvc-handleerror-attribute-custom.html)对如何记录[HandleError]属性捕获的错误有很好的解释。 – 2009-08-06 05:28:30