ASP.NET2.0 - 异常处理 最佳实践 Exception Handling

1. Request.redirect
2. Database logging
3. Event logging

protected void Application_Error(object sender, EventArgs e) {

Exception x = Server.GetLastError().GetBaseException();

EventLog.WriteEntry(LOG_SOURCE, x.ToString(), EventLogEntryType.Error);

}

posted @ 2008-05-21 14:38  许晓光  阅读(223)  评论(0)    收藏  举报