【发布时间】:2021-10-26 11:46:05
【问题描述】:
我刚刚将它添加到我的 web.config 中:
<security>
<ipSecurity allowUnlisted="false">
<!-- The following IP addresses are granted access, all else denied -->
<add allowed="true" ipAddress="123.123.105.0" subnetMask="255.255.255.0" />
<add allowed="true" ipAddress="123.123.100.0" subnetMask="255.255.255.0" />
</ipSecurity>
</security>
完全按预期工作,仅在特定 IP 范围内。但是,现在当我通过 iisExpress 在 localhost 上在 Visual Studio 中对此进行测试时,它当然会给我带来问题。这是我收到的 500.19 错误:
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".
我已经在服务面板中的本地机器上设置了 IPSecurity,因此它已启用,并且我在 ipSecurity 块中使用了一些选项,例如将“localhost”添加为 domainName 值 - 但可惜没有运气。 ....帮助我 StackOverflow,你是我唯一的希望! ;)
【问题讨论】:
-
我也遇到了这个问题,好像也找不到解决办法
标签: web-config localhost visual-studio-2013 iis-express