• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

ASP.NET Error Document (aspxerrorpath Missing)

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
 
By the way, the same problem exists with Plesk 9.0.1 (which I use for a second domain):
Here at least the redirection to error404.aspx works if I manually configure it.
But also here the redirection from the Web.config is ignored, so the aspxerrorpath variable is missing from the query string.

To me it simply looks like the problem is that the configured error documents ALWAYS override the settings in the Web.config.
So the solution would probably be to completely disable custom error documents (Apache style) and have IIS take care of everything itself.
I just can't find an option for that in Plesk...
 
Back
Top