M
MarvinM
Guest
I have the following lines in my Web.config:
<customErrors mode="RemoteOnly" defaultRedirect="~/error404.aspx">
<error statusCode="404" redirect="~/error404.aspx"/>
</customErrors>
Even though the redirection is parsed correctly, according to ASP.NET configuration in Plesk, it is completely ignored:
The configured error document (under "Web Directories") always overrides this setting.
The only way to have error404.aspx displayed is to set the 404 error document to URL and "/error404.aspx", but in this case, the "aspxerrorpath" parameter is missing, so my 404 page can't evaluate what caused the error.
Furthermore, the user is not redirected, i.e. the displayed URL stays the same ("http://my-domain.tld/foobar" instead of "http://my-domain.tld/error404.aspx?aspxerrorpath=foobar").
Thanks,
Marvin
<customErrors mode="RemoteOnly" defaultRedirect="~/error404.aspx">
<error statusCode="404" redirect="~/error404.aspx"/>
</customErrors>
Even though the redirection is parsed correctly, according to ASP.NET configuration in Plesk, it is completely ignored:
The configured error document (under "Web Directories") always overrides this setting.
The only way to have error404.aspx displayed is to set the 404 error document to URL and "/error404.aspx", but in this case, the "aspxerrorpath" parameter is missing, so my 404 page can't evaluate what caused the error.
Furthermore, the user is not redirected, i.e. the displayed URL stays the same ("http://my-domain.tld/foobar" instead of "http://my-domain.tld/error404.aspx?aspxerrorpath=foobar").
Thanks,
Marvin