Indy TIdFTP - EIdReplyRFCError - “无法打开数据连接”

时间:2012-07-02 07:29:43

标签: delphi ftp delphi-7 indy indy10

我们将Indy TIdFTPFileZilla 0.9.39 beta FTP服务器一起使用 经常(并非总是)我们的客户端收到以下异常:

exception class   : EIdReplyRFCError
exception message : Can't open data connection.
main thread ($d38):
006352e6 +03a     IdReplyRFC        258  +1 TIdReplyRFC.RaiseReplyError
0063af39 +005     IdTCPConnection   540  +0 TIdTCPConnection.RaiseExceptionForLastCmdResult
0063b17c +050     IdTCPConnection   644 +10 TIdTCPConnection.CheckResponse
0063aed2 +03a     IdTCPConnection   529  +2 TIdTCPConnection.GetResponse
0065986d +1ad     IdFTP            1460 +29 TIdFTP.InternalGet
006595bb +0f3     IdFTP            1386 +16 TIdFTP.List

此错误仅发生在他的网络内!而且不一致 我无法在我们的网络上重现此错误。 我在网上搜索了一个解决方案并没有找到任何结果。 有什么办法可以解决这个问题吗?

编辑:我们正在使用“被动”模式。

1 个答案:

答案 0 :(得分:0)

如果某人有相同的问题(可能是TLS),则某些服务器存在此问题。您可以打开/关闭:

void __fastcall TForm1::turnOffTLS(TIdFTP *choosenFTP){ choosenFTP->DataPortProtection=ftpdpsClear; choosenFTP->UseTLS=utNoTLSSupport; }

void __fastcall TForm1::turnOnTLS(TIdFTP *choosenFTP){ choosenFTP->UseTLS=utUseExplicitTLS; choosenFTP->DataPortProtection=ftpdpsPrivate; }