I've set up and configured ELMAH to log all of my errors on an ASP.NET MVC project I'm working on. It will be used by a small group of users who don't need to know too much so whenever there is any sort of error (404, InvalidOperation, Y2K... anything!) I just want to show them a generic default error view with instructions to call our helpdesk and sit tight.
ELMAH is up and running fine which our helpdesk staff will use to diagnose errors and log / elevate the tickets as necessary. My problem is in getting my global error page to show. I'm using the solution posted here to ensure that ELMAH and [HandleError] play nice together.
Web.config is set up as so:
<customErrors mode="On" />
If I access http://application/Home/Index which has a LINQ error (Sequence contains no elements) then I am shown my nice, generic error view from /Shared/Error.aspx but if I try to access http://application/Fake/Broken which is a 404 then I get the usual ASP.NET
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /Fake/Broken
Both errors get logged perfectly by ELMAH though.