Hay when i add defaultPath="/Error.aspx" to my web config i get an error that tells me that i have an error to my config. The problem is that without that all is going well with out errors. I have below some relevant settings:
<httpErrors defaultResponseMode="ExecuteURL" errorMode="Custom" existingResponse="Replace" >
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/Err.aspx" responseMode="ExecuteURL" />
</httpErrors>
<customErrors mode="On" defaultRedirect="~/Error.aspx" redirectMode="ResponseRewrite">
<error statusCode="404" redirect="~/Err.aspx" />
</customErrors>
Can you help me please. Do you know iis gives an error when i try to add a default path?