Using a global (dumb) error page for all ASP.NET MVC errors? -


I have set up and configured ELMAH to log all my errors on an ASP.NET MVC project. . It will be used by a small group of users who do not need to know too much, whenever any type error (404, invalidity, Y2K ... anything!) I Just want to show a general default error view with our helpdesk to call and tighten instructions.

ELMAH is up and running, I have posted to make sure that our Helpdesk staff is in receipt of my global error page to diagnose errors and to show log / my problem as needed. I am using the solution that ELMAH and [HandleError] play well together.

Web.config is set to:

  & lt; CustomErrors mode = "on" />  

If I am using a LINQ error (no element in the sequence), then I have shown my good, normal error view from / shared / Error.aspx, but If I try to reach those 404 then I get a normal ASP.Net

  Server error in the '/' application was not found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could be renamed, or temporarily unavailable, please review the following URL and make sure it is spelled correctly URL: / Fake / Broken  

Although both errors are fully met by ELMAH

If you are looking to show only a normal error page, then you specify the page itself Can:

  & custom; Translator mode = "on" defaultRedirect = "error" HTM "/>  

This causes all unrestricted exceptions, page not found, etc. to show your" error.htm " Although you may be more specific about error codes:

  customErrors mode = "on" & gt; & lt; error status code = "404" redirect = "No-phone HTM" /> & lt; / customErrors & gt;  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -