I have this configuration that works and redirects the following errors correctly.
<httpErrors errorMode="Custom" existingResponse="Replace" defaultResponseMode="ExecuteURL" > <remove statusCode="403" /> <remove statusCode="404" /> <remove statusCode="500" /> <error statusCode="403" responseMode="ExecuteURL" path="/Error/AccessDenied" /> <error statusCode="404" responseMode="ExecuteURL" path="/Error/PageNotFound" /> <error statusCode="500" responseMode="ExecuteURL" path="/Error/ApplicationError" /> </httpErrors>
But when I add the following default path to try to add catch all
<httpErrors errorMode="Custom" existingResponse="Replace" defaultResponseMode="ExecuteURL" defaultPath="/Error/ApplicationError">
Server throws web.config error
HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid. Module CustomErrorModule
Now this directly contradicts the msdn documentation
Any help would be greatly appreciated!
Neil
source share