如何解决 IIS 7.5 中管理员帐户的 FTP 错误“无法检索目录列表”

sma*_*man 22 iis iis-7 ftp iis-7.5

使用我的管理员帐户,我通过 FileZilla FTP 连接到我的 IIS 7.5 FTP 站点。我能够成功上传文件,但我不断收到“无法检索目录列表”作为响应。

在被动模式下,命令、响应和错误是:

Command:    LIST
Response:   150 Opening BINARY mode data connection.
Response:   550 The network connection was aborted by the local system. 
Error:  Failed to retrieve directory listing
Run Code Online (Sandbox Code Playgroud)

在主动模式下,命令、响应和错误是:

Command:    PORT 192,168,1,129,102,151
Response:   501 Server cannot accept argument.
Error:  Failed to retrieve directory listing
Run Code Online (Sandbox Code Playgroud)

我做错了什么?

小智 18

我也有这个问题,它与 IIS 选择的数据端口有关。我将它设置为使用特定的端口范围,但是当我的客户端尝试使用被动模式时,它显示它使用了错误的端口。

本文介绍了计算它使用的端口的方法。例如

227 Entering Passive Mode (x1,x2,x3,x4,y1,y2)
Run Code Online (Sandbox Code Playgroud)

它将使用的 IP 是 x1.x2.x3.x4 和端口 (y1*256) + y2。我看到了 y1 和 y2 的错误值,所以我不得不重新启动“Microsoft FTP 服务”才能真正让它识别我在 IIS 的 FTP 防火墙设置中设置的值。

  • 谢谢。重新启动 Microsoft FTP 服务为我解决了这个问题。 (4认同)

小智 6

对我来说,重启没有帮助,但禁用被动模式有帮助。

  • 我在 FileZilla 中明确设置了活动模式,它对我有用。 (2认同)

Laz*_*One 3

听起来像是防火墙配置问题。请看一下这篇文章(如果您还没有看过):http://learn.iis.net/page.aspx/309/configuring-ftp-firewall-settings/