In addition to this, I override the OnApplicationError with my own Global.cs and with this I log the error and email an Administrator. This might be a bit overkill for a standard website, but I'm working with ecommerce booking systems so I like to keep tabs on these things.
Then I catch 404's and redirect with a setting in the umbracoSettings.config:
<errors>
<error404>[NODE ID OF CONTENT PAGE]</error404>
</errors>
regarding IIS config there is some confusion whether the current (IIS7+) best practice is use the CustomErrors tag or the httpErr tag..
Currently we work with customErrors mode="On" with all other setting in httErr tag
Internet shows (to me) that CustomError tag is deprecated?
It discusses how best to make sure errors are handled with the correct response types and uses a combination of both CustomerErrors and HttpError tags.
In relation to 500 errors, personally I can't see how Umbraco can handle them. a 500 error is generally a server error and in my experience so far, when this happens it is because the website has fallen over to some degree. I.e. Umbraco isn't able to run/resolve the issue so it would always fall back to IIS to handle.
404 handled by umbraco, 500 handled by IIS
Hi guys,
I'm trying this and cannot get it to work
Setting up 404 by umbraco is easy, but it needs IIS setting
However, handling 500 error by IIS requires
But then the umbraco routing does not work!
Solution is of course to have IIS reroute 404 to the umbraco page, is rerouting 500 and other error pages planned for umbraco 8? Thanks
I have a general "Oops" page to handle exceptions/general errors which can be defined in the web.config with:
In addition to this, I override the OnApplicationError with my own Global.cs and with this I log the error and email an Administrator. This might be a bit overkill for a standard website, but I'm working with ecommerce booking systems so I like to keep tabs on these things.
Then I catch 404's and redirect with a setting in the umbracoSettings.config:
Matthieu thanks,
regarding IIS config there is some confusion whether the current (IIS7+) best practice is use the CustomErrors tag or the httpErr tag.. Currently we work with customErrors mode="On" with all other setting in httErr tag
Internet shows (to me) that CustomError tag is deprecated?
I've just realised I pasted my dev settings, customErrors should have been On not off! (now edited)
Anyhow, I haven't come across anything that suggests customErrors has been deprecated? I'd be keen to read up on that if you have any links.
As to best practices I've just used what I know works but I'm happy to adjust if I find a better alternative :)
Hi Arjan,
Although this doesn't relate directly to Umbraco, I happened to come across this today. http://benfoster.io/blog/aspnet-mvc-custom-error-pages
It discusses how best to make sure errors are handled with the correct response types and uses a combination of both CustomerErrors and HttpError tags.
In relation to 500 errors, personally I can't see how Umbraco can handle them. a 500 error is generally a server error and in my experience so far, when this happens it is because the website has fallen over to some degree. I.e. Umbraco isn't able to run/resolve the issue so it would always fall back to IIS to handle.
Nik
So the TL;DR version is that you still need both the
is working on a reply...