2016-03-07 66 views
0

我正在尝试为我的Azure Web应用程序服务配置web.config。我想限制ftp访问只有特定的URL。但是当我加入标签时,它给我的错误 -无法识别的配置部分system.ftpServer for azure

Parser Error Message: Unrecognized configuration section system.ftpServer. 

你能指导我在哪里我犯了错误。 在此先感谢

我的Web.config文件 -

<?xml version="1.0" encoding="UTF-8"?> 
<configuration> 
<system.web> 
    <customErrors mode="Off" /> 
</system.web> 

    <system.webServer> 
    <httpErrors errorMode="Detailed" /> 
    </system.webServer> 

    <location path="<<FTP hostname>>"> 

    <system.ftpServer> 
    <security> 
     <authorization> 
     <add accessType="Allow" roles="administrators" permissions="Read, Write" /> 
     </authorization> 
     <requestFiltering> 
     <fileExtensions allowUnlisted="true"> 
      <add fileExtension=".exe" allowed="false" /> 
      <add fileExtension=".bat" allowed="false" /> 
      <add fileExtension=".cmd" allowed="false" /> 
     </fileExtensions> 
     <requestLimits maxAllowedContentLength="1000000" maxUrl="1024" /> 
     <hiddenSegments> 
      <add segment="_vti_bin" /> 
     </hiddenSegments> 
     </requestFiltering> 
     <ipSecurity enableReverseDns="false" allowUnlisted="true"> 
     <add ipAddress="127.0.0.1" allowed="true" /> 
     <add ipAddress="169.254.0.0" subnetMask="255.255.0.0" allowed="false" /> 
     </ipSecurity> 
    </security> 
    </system.ftpServer> 

    </location> 

回答

相关问题