Generating a custom error page
Clone this wiki locally
A blog post explaining this in C# is available here
Additional (more recent) C# post is available here.
A blog post in VB.Net is available here(404)
A note on the IStatusCodeHandler in release mode
If your app is setup with
IStatusCodeHandlers, and you want to continue to provide custom error pages for status codes of 50x (internal server error) for view rendering exceptions when compiling for release, you will need to manually set StaticConfiguration.DisableErrorTraces = false in your Bootstrapper.ApplicationStartup override. For more info on this, see issue #2052.