Thursday, February 24, 2022

Hide stack trace. Custom errors.

  <system.web>

  

    <!--  CUSTOM ERROR MESSAGES

          Set customError mode values to control the display of user-friendly

          error messages to users instead of error details (including a stack trace):


          "On" Always display custom (friendly) messages

          "Off" Always display detailed ASP.NET error information.

          "RemoteOnly" Display custom (friendly) messages only to users not running

          on the local Web server. This setting is recommended for security purposes, so

          that you do not display application detail information to remote clients.

    -->

    <customErrors mode="RemoteOnly" />

  </system.web>

No comments:

Post a Comment