If I have a <customErrors> section in my Web.config that says to redirect to Error.html, then putting code in the Application_Error method in the Global.asax to redirect to Error.html is redundant is it not? Technically, I could bypass the Web.config by redirecting to a different page in the Application_Error method if I wanted to, but since I don’t want to go to a separate page I don’t think I need the code.
If I have a <customErrors> section in my Web.config that says to redirect to
Share
Per this article:
http://support.microsoft.com/kb/306355
If you have the
customErrorsredirect in yourweb.config, you don’t need to do a redirect in theGlobal.asax‘sApplication_Errorevent. You are right, this would be redundant.However, I would test it just to be sure. I’ve always just used the
Global.asaxand redirected from there. I’ve never used thecustomErrorserror page feature.