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:
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:
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. :-)
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:
But this does not seem to have any effect.
Thanks
You may need to specifically add the 500 error to your web.config, the following goes into the system.web section:
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" />
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. :-)
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
is working on a reply...