无法识别的配置部分system.ftpServer for azure

时间:2016-03-07 16:16:53

标签: azure iis cloud

我正在尝试为我的Azure网络应用服务配置web.config。我想将ftp访问限制为仅限特定的URL。但是当我添加标签时,它给了我错误 -

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>

1 个答案:

答案 0 :(得分:0)

IIS的一些内容不支持&system; system.ftpServer&#39;配置或您需要手动下载ftp模块。您可以参考artice https://www.iis.net/configreference/system.ftpserver并检查您的IIS版本。

相关问题