1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

ASP.NET Error Document (aspxerrorpath Missing)

Discussion in 'Plesk for Windows - 8.x and Older' started by MarvinM, Nov 20, 2009.

  1. MarvinM

    MarvinM Guest

    0
     
    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
     
  2. MarvinM

    MarvinM Guest

    0
     
    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...
     
Loading...