2013-05-29 5 views
1

Windows Azure 웹 사이트에서 IP 범위 이외의 모든 것을 차단해야하지만 불행히도 실제로는 알 수 없습니다.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 웹 사이트 솔루션에서이를 수행하는 방법을 알 수는 없습니다.

누군가가 나를 도와 줄 수 있기를 바랍니다.

답변

0

당신은 시작 파일 (예를 들어 STARTUP.CMD)를 작성하여 웹 구성 섹션의 잠금을 해제하고 해당 속성의 선택 "항상 출력에 복사"를 다음과 같이 서비스 정의에이 호출 :

<Startup><Task commandLine="startup.cmd" executionContext="elevated" taskType="simple"/></Startup> 
이 같은

다음 STARTUP.CMD에서 실행 뭔가 : 일부 섹션이 잠금을 해제 할 수 있으며, 다른 사람들이 그래서 당신은 가장 높은 수준거나 따라 아래 단계 또는 두 개의 잠금을 해제해야 할 수없는

%windir%\system32\inetsrv\AppCmd.exe unlock config /section:system.webServer/security/ipSecurity 

주의!

+1

질문은 Azure 웹 사이트가 아니라 Azure 클라우드 서비스에 관한 것입니다. 여전히 좋은 대답이지만이 질문에는 해당되지 않습니다. – Carl

관련 문제