Elmah with customErrors not emailing unless it's a 404?

You can filter things with elmah like such in your Global.asax. Cs: ELMAH Filtering protected void ErrorLog_Filtering(object sender, ExceptionFilterEventArgs e) { FilterError404(e); } protected void ErrorMail_Filtering(object sender, ExceptionFilterEventArgs e) { FilterError404(e); } //Dimiss 404 errors for ELMAH private void FilterError404(ExceptionFilterEventArgs e) { if (e.Exception. GetBaseException() is HttpException) { HttpException ex = (HttpException)e.Exception.

GetBaseException(); if (ex.GetHttpCode() == 404) { e.Dismiss(); } } } So add the call to FilterError404 to any part of the filtering. The above example will have it filter 404 for both ErrorLog and Email. Also check out: http://code.google.com/p/elmah/wiki/ErrorFiltering You can also do Filtering By Source as described in the link: elmah> ... ........................... ....................... ............................. .............................. ........................ ............................. .............. ..................

You can filter things with elmah like such in your Global.asax. Cs: //ELMAH Filtering protected void ErrorLog_Filtering(object sender, ExceptionFilterEventArgs e) { FilterError404(e); } protected void ErrorMail_Filtering(object sender, ExceptionFilterEventArgs e) { FilterError404(e); } //Dimiss 404 errors for ELMAH private void FilterError404(ExceptionFilterEventArgs e) { if (e.Exception. GetBaseException() is HttpException) { HttpException ex = (HttpException)e.Exception.

GetBaseException(); if (ex.GetHttpCode() == 404) { e.Dismiss(); } } } So add the call to FilterError404 to any part of the filtering. The above example will have it filter 404 for both ErrorLog and Email. Also check out: http://code.google.com/p/elmah/wiki/ErrorFiltering You can also do Filtering By Source as described in the link: ... Check web.

Config: ........................... ....................... ............................. .............................. ........................ ............................. .............. .................. FYI: NuGET Package also available as explained by Scott Hanselman: http://www.hanselman.com/blog/NuGetPackageOfTheWeek7ELMAHErrorLoggingModulesAndHandlersWithSQLServerCompact.aspx.

Great thanks! That helped a lot. Any idea why my exceptions aren't triggering emails though?

– Christopher Johnson Sep 15 at 23:08 Ok compare your web. Config with mine see if there are any differences. – DarkS0ul Sep 15 at 23:28 used your web.

Config (added in the missing pieces), still not working. I talked to a buddy of mine at work and he helped me get it going. I had to add some custom classes and then call them from global.

Asax to make it happen. Really appreciate your help. – Christopher Johnson Sep 15 at 23:33 That's great I also had some trouble at first implementing it but after 30 odd pages (more like 5) I got it going.

FYI: is a NuGet package as well as explained above. Is there something I left off that needed to be done when others look at this post? – DarkS0ul Sep 150 at 3:53.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions