Copied to clipboard

Flag this post as spam?

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


  • Avraham Kahana 22 posts 56 karma points
    Mar 12, 2015 @ 13:48
    Avraham Kahana
    0

    Umbraco custom error pages - handling 404 working but 500 not

    I have configured umbraco following this umbraco wiki. Handling 404 not found errors is working fine, I am ending up in the content page I specified within the "error404" tag.

    In attempting to test handling http status code 500-family errors, I am forcibly dividing by zero inside a view, but I am not ending up in the content page (the same for 404) that was specified to handle 500 errors. Instead, I get a regular asp.net, with red title "Server error in "/" Application" and the yellow page stating "Attempted to divide by zero.", along with the stack.

    Follows how my umbracoSettings.config looks like (the section that is supposed to configure custom error pages):

    <errors>
      <error404>33990</error404>
      <error500>33990</error500>
    </errors>
    

    I am using IIS 7.5.7600.... According to the aforementioned umbraco wiki, I should add the following to my web.config, within the

    <httpErrors existingResponse="PassThrough"/>
    

    Doing so, however, does not fix it.

    What am I missing ?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 25, 2015 @ 11:26
    Jan Skovgaard
    0

    Hi Avraham

    Setting error 500 pages is not supported using this config. It's not something that is baked into Umbraco out of the box. That will require a custom error 500 handler i think. All I know is that it won't work doing it like this :)

    /Jan

  • Jose Gonzalez 15 posts 98 karma points
    Nov 30, 2015 @ 16:51
    Jose Gonzalez
    0

    Hi Jan,

    Do you know if I can redirect a 410 error to my 404 page using the umbracosettings.config file?

    Thanks

  • Avraham Kahana 22 posts 56 karma points
    Mar 25, 2015 @ 11:29
    Avraham Kahana
    0

    Well thanks Jan, at least I was given a definitive answer :)

  • Avraham Kahana 22 posts 56 karma points
    Mar 29, 2015 @ 11:31
    Avraham Kahana
    0

    Jan, I can perform a redirect to a 500 error using the approach described here in a regular asp.net mvc project, but this redirect will not work in my Umbraco site.

    The redirect in my web.config needs to be to a SurfaceController? Is this supposed to work, in the first place ? Additionally, does umbraco support working with both "customErrors" and umbraco.settings errors configuration ?

    I tried also Sebastiaan's solution, the redirect is not working. I now get blank pages for both my 404 and 500 errors.

  • 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