Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mark Sacco 1 post 21 karma points
    Nov 26, 2011 @ 13:17
    Mark Sacco
    0

    500 Error Handling

    Hi People

    I want to handle 500 errors better. My site is down due to DB problems so I cant handle the errors like I would with 404's inside Umbraco.

    I have tried the setting up a holding.htm page and put the following in my web.config

     

     

    <

     

     

    customErrors mode="RemoteOnly" defaultRedirect="~/Holding.htm">

    <

     

     

    error statusCode="500" redirect="~/Holding.htm"/>

    </customErrors>

    and....

    <

     

     

    httpErrors>

    <

     

     

    remove statusCode="500" subStatusCode="-1" />

    <

     

     

    error statusCode="500" prefixLanguageFilePath="" path="~/Holding.htm" responseMode="ExecuteURL" />

    </

     

     

    httpErrors>

    But it seems the API is still trying to handle the requests. The redirect (I think) is working but because the API is trying to run I get redirected again to; "Holding.htm?aspxerrorpath=/default.aspx" and then get a 404 instead (which doesnt work as the db is down so I get the standard one). 

    So what am I doing wrong?

    Thanks in advance.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies