I like to protect all aspx files in the ~/Secure/secure folder , so certain IP addresses can access folders aspx. I added the following file web.configto the folder, hoping it would add the parent web.config:
<configuration>
<system.webServer>
<security>
<ipSecurity allowUnlisted="false">
<clear/>
<add ipAddress="192.168.100.1" />
<add ipAddress="169.254.0.0" subnetMask="255.255.0.0" />
</ipSecurity>
</security>
</system.webServer>
</configuration>
The problem is that I get this error when I try to access any of the aspx pages in a folder:
This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".
What needs to be done to make this idea happen? I like to just include one file web.configin a folder and this provides IP address authorization. I like this idea, as it is only code and code.
source
share