Problem with customerror section in web.config RRS feed

  • Question

  • User-31278322 posted

    Hi to all I'm facing a strange behavior with customerror configuration 

    In my website I've configured in web.config the following parameters:

    <customErrors mode="On" defaultRedirect="/htm/errore_o.htm">
    <error statusCode="404" redirect="/errore404.htm" />
    <error statusCode="500" redirect="/errore404.htm"/>

    <remove statusCode="500" subStatusCode="-1" />
    <remove statusCode="404" subStatusCode="-1" />
    <error statusCode="404" prefixLanguageFilePath="" path="/errore404.htm" responseMode="ExecuteURL" />
    <error statusCode="500" prefixLanguageFilePath="" path="/m/GesErr/error.asp" responseMode="ExecuteURL" />

    When I call the following url


    The custom error page is not displayed but appears the YSOD

    When I call the following url


    the custom error page is correctly displayed.

    To complete the strange situation, this behavior appears only in Production site, not in development environment

    Can someone help me to identify the problem?

    Best regards


    Monday, June 9, 2014 3:48 AM


  • User-166373564 posted

    HI fabjoe,

    this behavior appears only in Production site, not in development environment

    customErrors element provides information about custom error messages for an ASP.NET application. The customErrors element can be defined at any level in the application file hierarchy.

    <customErrors defaultRedirect="url"
         <error. . ./>

    Mode attribute is required attribute. Please check whether it helps you.



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, June 10, 2014 3:57 AM