相关疑难解决方法(0)

web.config ipSecurity的内部服务器错误

这是我的web.config,它有一些阻止Ipaddress的标签

<configuration>
 <connectionStrings>
    ...
 </connectionStrings>
 <appSettings>
  ....
 </appSettings> 
 <runtime>
   ....
 </runtime>
  <system.webServer>
    <security> 
        <ipSecurity allowUnlisted="false"> 
            <clear/> 
             <add ipAddress="127.0.0.1" allowed="true"/>
             <add ipAddress="83.116.19.53" allowed="true"/> 
        </ipSecurity>  
    </security>
</system.webServer> 
</configuration>
Run Code Online (Sandbox Code Playgroud)

我的目的是阻止除上述之外的任何其他IP.以上是我希望从中访问网站的唯一IP地址.但是使用"ipSecurity"标签我总是得到500 - 内部服务器错误,没有它,网站运行正常.

我确保在服务器上安装了"IP和域限制".如果我遗失任何东西,请告诉我.谢谢.

asp.net iis web-config

14
推荐指数
5
解决办法
2万
查看次数

标签 统计

asp.net ×1

iis ×1

web-config ×1