Remember to always have a static customErrors page

I was just surfing around on and got a yellow screen of death!

I must say I was slightly surprised. In web projects that I have been involved in we have always added two customErrors pages one to handle generic errors which redirects to an errorpage.aspx page and then a static html page errorpage.html which is only used when an error occurs on the dynamic error page… A sample configuration using location follows:


 <customErrors mode="on" defaultRedirect="errorpage.aspx"/>

<location path="errorpage.aspx">
  <customErrors mode="on" defaultRedirect="errorpage.html"/>


That way if we have a problem with our application that affects the entire site, for instance menu and navigational rendering, we can still show a nice error page with a message like “The site is temporarily unavailable, please try again in a few minutes.”

Leave A Comment...