View Complete Thread
  • Re: Custom error page configuration on IIS 8

    May 30, 2019 08:50 AM|philippe03|LINK

    Brando Zhang

    Hi madhura.torsekar,

    If you host an asp.net application [url=https://vitrerie24.ch]vitrerie Sion dépannage[/url], I suggest you could directly use C# codes to throw 403 exception.

    Codes as below:

      throw new HttpException(403, "This is a '403' test");

    But ASP.Net application will not go to IIS error page, it will go to asp.net web custom error page.

    I suggest you could add below web.config setting in system.web tag.

        <customErrors  mode="On">
          <error statusCode="403" redirect="/default.aspx" />
        </customErrors>

    Besides, if you want to test the IIS custom error page, I suggest you could try to enable the SSL required setting.

    If you still use http to access the site, you will receive 403 forbidden error.

    Best Regards,

    Brando

    <div class="gsrt tw-ta-container tw-nfl" id="tw-target-text-container">
    In any case, thank you for sharing all this with us.
    
    </div>