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):
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, 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.
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):
I am using IIS 7.5.7600.... According to the aforementioned umbraco wiki, I should add the following to my web.config, within the
Doing so, however, does not fix it.
What am I missing ?
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
Hi Jan,
Do you know if I can redirect a 410 error to my 404 page using the umbracosettings.config file?
Thanks
Well thanks Jan, at least I was given a definitive answer :)
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.
is working on a reply...