手动记录的ELMAH错误不是';不要发送电子邮件
我正在手动记录某些错误,如下所示:手动记录的ELMAH错误不是';不要发送电子邮件,elmah,elmah.mvc,Elmah,Elmah.mvc,我正在手动记录某些错误,如下所示: ApplicationException ex = new ApplicationException("Testing"); Elmah.ErrorLog.GetDefault(System.Web.HttpContext.Current).Log(new Elmah.Error(ex)); 未处理的异常正在发送电子邮件,但手动记录的异常则不会。我也试过: Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
ApplicationException ex = new ApplicationException("Testing");
Elmah.ErrorLog.GetDefault(System.Web.HttpContext.Current).Log(new Elmah.Error(ex));
未处理的异常正在发送电子邮件,但手动记录的异常则不会。我也试过:
Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
如何让这些手动记录的错误发送电子邮件(而不抛出并显示自定义错误页)?我说得太快了
这不会发送电子邮件:
Elmah.ErrorLog.GetDefault(System.Web.HttpContext.Current).Log(new Elmah.Error(ex));
但这确实: