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?
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" />
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.