Hi all,
I've implemented the Application_Error handler in Global.asax.cs which handles all unhandled errors thrown by the ASP.NET application.
This error handler is fine for most situations but it seems to handle HTTP errors as well, e.g. 404 errors. This didn't really come as a surprise to me but my question is how do I selectively handle certain errors in Application_Error and leave the rest rethrown again.
E.g. I don't want to handle HTTP 404 errors, I want to redirect it to a error page for HTTP 404 based on web.config. But for other errors I want Application_Error to handle it.
The alternatively solution I am looking for is a way of detecting that an HTTP error has occured and redirect it programmatically along with its status code.
Bonus for me if you have solution to both alternatives.
Thank you
James
