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.

see https://code.google.com/p/elmah/wiki/errorfiltering


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -