500 Error Page

Posted by Community Admin on 03-Aug-2018 14:58

500 Error Page

All Replies

Posted by Community Admin on 23-Oct-2012 00:00

I am trying to display a custom error page for a Sitefinity 5.0.2523.0 SE install on a Windows Server 2008 running IIS 7. I tried this:

<customErrors mode="RemoteOnly" defaultRedirect="~/error">
    <error statusCode="404" redirect="~/page-not-found"/>
    <error statusCode="500" redirect="~/error"/>
</customErrors>

and this...
<httpErrors>
   <remove statusCode="404" subStatusCode="-1" />
   <error statusCode="404" prefixLanguageFilePath="" path="/page-not-found" responseMode="ExecuteURL" />
   <remove statusCode="500" subStatusCode="-1" />
   <error statusCode="500" prefixLanguageFilePath="" path="/error" responseMode="ExecuteURL" />
</httpErrors>

These pages exist under the pages section in Sitefinity. I can navigate to both /error and /page-not-found. If I put in an invalid url then the 404 redirect works and /page-not-found is displayed. If I hit a page that has a 500 error the yellow screen of death is displayed.

I am at a loss of what to do to avoid this ugly screen besides writing perfectly robust code... but that doesn't always happen. Thoughts?

Posted by Community Admin on 23-Oct-2012 00:00

Erik,

I saw some positive feedback regarding the custom errors method.

Posted by Community Admin on 23-Oct-2012 00:00

Yeah, I saw that before. I don't think they are really doing anything that I'm not. I haven't had an issue with extensions and I think that is all that is different.

This thread is closed