1

I have configured a site to use SSL, thus I added following section in my web.config

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <httpErrors>
            <error statusCode="403" subStatusCode="4" path="D:\Data\www\Site\403.htm" responseMode="File" />
        </httpErrors>
    </system.webServer>
</configuration>

Once I have included it, and when I visited http://my-url/pagr/some.aspx I got The page cannot be displayed because an internal server error has occurred. message. If I remove it I could see default 403 error page.

Is it something wrong with my config?

2
  • Are you sure D:\Data\wwwroot\Site\403.htm exists on the live server? Commented May 9, 2012 at 16:14
  • @Curt, I am pretty sure, because I used II7 management console to pick the file. Commented May 9, 2012 at 16:17

1 Answer 1

1

Reset IIS to check if the path you set works

or

Give relative path from your website root instead of give the file system path to check if it works

Put the 403.htm in the same folder your web.config is located.

<error statusCode="403" subStatusCode="4" path="403.htm" responseMode="File" />
Sign up to request clarification or add additional context in comments.

3 Comments

In this case the default 403 page is displayed.
Did you reset IIS after setting httpError tags
I did a reset and got same result.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.