Last post Aug 05, 2019 05:29 AM by Yuki Tao
Aug 03, 2019 05:42 AM|aminsoraya|LINK
hi every body .
I use this code snipped for prevent access to the files (root ) , sub folders and files. every thin is okay in locally place but when i published the web config file. it not working at all
please help me.
<httpErrors errorMode="Custom" existingResponse="Replace">
<error statusCode="401" path="/PermissionDenied.html" responseMode="Redirect"/>
<add accessType="Deny" users="?" />
Aug 05, 2019 05:29 AM|Yuki Tao|LINK
every thin is okay in locally place but when i published the web config file. it not working at all
Since the <httpErrors> element was introduced in IIS 7.0,so I suggest you need to pay attention to your the version of IIS and using
And make sure HTTP errors is enabled in IIS,like the picture:
If there is no such icon,please set it enable in windows features,like the picture:
I have test and work well based on your code both in local and publishing environment.
You could also try to add httpErrors by setting Error Pages in IIS,more details,please refer to: