我需要在我的 Windows Azure 网站上阻止除 IP 范围之外的所有内容,但不幸的是,我无法真正弄清楚。
我的 Web.config 如下所示:
<configuration>
<system.webServer>
    <staticContent>
        <mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
    </staticContent>
    <security>
        <ipSecurity allowUnlisted="false"><!-- this line blocks everybody, except those listed below -->                
            <clear/><!-- removes all upstream restrictions -->
            <add ipAddress="127.0.0.1" allowed="true"/>             
            <add ipAddress="MY IP" subnetMask="255.255.255.0" allowed="true"/>                              
        </ipSecurity>
    </security>     
我一直在寻找解决方案,但没有任何工作。我可以看到 ipSecurity 需要在 ApplicationHost.config 中解锁,但我无法在他们的 Azures 网站解决方案中弄清楚如何做到这一点。
所以我真的希望有人可以帮助我或进一步解决问题。