does elmah send errors to mail even if they got filtered ? -
i have web site mvc4 c# using elmah error logging. in web config declared email send on error elmah , error filtering in code in global.asax :
void errorlog_filtering(object sender, exceptionfiltereventargs e) { if (e.exception.getbaseexception() invalidoperationexception) { if (e.exception.message.startswith("the connection id in incorrect format")) e.dismiss(); } }
when go http://mydomain/elmah.axd
see no more errors got filtered. them mail.
i.e - if application has error ""the connection id in incorrect format" ,i notify on email elmah, , don't want notify ... there way filter in mail notifications ?
i had same issue. have define second function filter out emails separately. signature of function is:
void errormail_filtering(object sender, exceptionfiltereventargs e) { }
calling e.dismiss() within method prevent exception being e-mailed.
Comments
Post a Comment