I'm trying to implement this accepted solution for displaying a custom error message:
https://stackoverflow.com/a/5229581/141172
However, IE9 always displays a generic 500 error message with this solution. Google Chrome displays my custom error message.
Making this change:
Response.StatusCode = 200; // don't return: 500
causes the intended behavior in IE9 and Chrome.
However, it does not seem at all reasonable to change the HTTP status code just to make this work in IE9 (for one, website monitoring solutions would not see the 500 if things fail).
How can I add custom error handling in a manner that will work across all browsers, without changing the HTTP status code?