I want a custom error page shown for 500, 404 and 403. Here\'s what I have done:
Enabled custom errors in the web.config as follows:
I had everything set up, but still couldn't see proper error pages for status code 500 on our staging server, despite the fact everything worked fine on local development servers.
I found this blog post from Rick Strahl that helped me.
I needed to add Response.TrySkipIisCustomErrors = true;
to my custom error handling code.