佛山软件定制

捕获asp.net运行中产生的异常

可以在httpmodule中捕获异常并记录

 

Exception ex = context.Server.GetLastError().InnerException;
 if (ex == null) ex = context.Server.GetLastError();
//HttpContext.Current.Response.Write((ex==null).ToString());
//HttpContext.Current.ClearError();

应该将内联异常一并处理

posted on 2011-01-26 18:37  New.min  阅读(184)  评论(0编辑  收藏  举报

导航