Elmah logging 404 errors only; not unhandled exceptions within controller

469 views
Skip to first unread message

zoidicus

unread,
Oct 31, 2013, 9:05:22 PM10/31/13
to el...@googlegroups.com
I used NuGet to install Elmah.MVC (2.1.1) to an ASP.NET MVC 4 Web API project running in the Azure cloud.  I kept the default values except that I set AllowRemoteAccess to true (web.config).  It seems to log 404 errors correctly, but nothing else.  Specifically I have exceptions being thrown (deliberately) in api controller actions that are going unnoticed by Elmah.  Why would it see and log the 404 errors and not the internal exceptions?


James_2JS

unread,
Nov 1, 2013, 5:00:53 AM11/1/13
to el...@googlegroups.com
Hi there,

Check out this post here for an explanation of the behaviour you are seeing: http://blogs.msdn.com/b/webdev/archive/2012/11/16/capturing-unhandled-exceptions-in-asp-net-web-api-s-with-elmah.aspx

There is a NuGet package out there that resolves the problem, though I haven't taken it for a spin and cannot verify its effectiveness:

Hope this helps,

James
Reply all
Reply to author
Forward
0 new messages