i’ve created a general exception handler in de the global_asax.
In there i log the exception, and redirect to /error
In that controller, i show the view with a friendly message, and i also set the Response.StatusCode = 500;
And now i’m wondering if that is ok….
In my localhost cassini this works fine, but when deployed on IIS i get the standard IIS 500 page and not my custom friendly view.
Is that by design?
Try setting the TrySkipIisCustomErrors property in your error handler:
It will prevent IIS error pages from getting in the way. Also, make sure you’ve correctly configured customErrors in Web.config