Copied to clipboard

Flag this post as spam?

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


  • Phil Hunt 1 post 21 karma points
    Jul 15, 2011 @ 18:13
    Phil Hunt
    0

    Custom 500 Error Page

    Is is possible to have a custom 500 error page should we have an issue with our umbraco installation?

    I have seen this post:

    http://our.umbraco.org/forum/developers/api-questions/4919-Custom-Error-Page

    However this does not work if, for example, a critical umbraco file is missing as the default .net error page is shown. We have tried setting the following line in web.confi:

     <customErrors mode="On" defaultRedirect="/error.aspx">

    But this does not seem to have any effect.

    Thanks

     

  • Sebastiaan Janssen 5045 posts 15477 karma points MVP admin hq
    Jul 18, 2011 @ 10:28
    Sebastiaan Janssen
    0

    You may need to specifically add the 500 error to your web.config, the following goes into the system.web section:

    <error statusCode="500" redirect="/error.aspx" /> 
  • Tim 1193 posts 2675 karma points MVP 3x c-trib
    Jul 19, 2011 @ 13:33
    Tim
    0

    If you are using IIS7, you may need to specify that IIS should pass the error message down to your app to handle. To do this, make sure that this setting is present under system.webserver in your web.config file:

    <httpErrors existingResponse="PassThrough" />

  • Sebastiaan Janssen 5045 posts 15477 karma points MVP admin hq
    Jul 19, 2011 @ 14:09
    Sebastiaan Janssen
    0

    You'll want to be really careful doing that, as it will also affect all of the other errors. I'm not entirely sure about the exact configuration for this, so tread carefully and test what you're doing. :-)

  • xleon 21 posts 43 karma points
    Sep 28, 2011 @ 05:06
    xleon
    0

    I was trying to set error pages in umbracosettings.config and it didnĀ“t work.

    I also tried in the tag <customErrors> of the <system.web> section. Nothing...

    Then I modified the custom Errors directly in IIS7 and I saw the results in web.config:

    Inside the <system.webServer> section:

    <httpErrors>

                <remove statusCode="404" subStatusCode="-1" />

                <error statusCode="404" prefixLanguageFilePath="" path="/page-errors/error404.aspx" responseMode="ExecuteURL" />

            </httpErrors>

     

    Now everything works as expected.

    Cheers

Please Sign in or register to post replies

Write your reply to:

Draft