Archived Forum Post

Index of archived forum posts


Why does Chilkat FTP2 fail when Filezilla does not?

Apr 22 '15 at 11:34


We had some customer upgrade their computers from Windows XP to Windows 7 and now we are unable to download files from the FTP server (Filezilla Server 9.5). We have been downloading files for years without a problem but now we get the following error:

    DllDate: Mar 27 2014
    UnlockPrefix: SIMONWFTP
    Username: DELLXPS:Simon
    Architecture: Little Endian; 32-bit
    Language: ActiveX
    VerboseLogging: 0
      enabled: yes
      heartbeatMs: 0
      sendBufferSize: 65536
    AutoGetSizeForProgress: 0
      localFilename: c:\temp\FC042015.153
        ModeZ: 0
        BinaryMode: 1
          passive transfer mode
              sendingCommand: PASV
              replyLineQP: 227 Entering Passive Mode (10,100,43,99,19,169)
              commandResponse: 227 Entering Passive Mode (10,100,43,99,19,169)
              statusCode: 227
              port: 5033
                failReason2: 7
              dataConnectSuccess: 0
            setupPassiveDataSocket dataConnect failed.
          Failed to setup passive data socket for upload
    TotalTimeMs: Elapsed time: 21046 millisec

However we can download the files using Filezilla client so I am unsure as to why your product is unable to do the same. I have also tried using the Windows API (Windows 2012 Server R2) and it too fails.



If you check the logs in your Filezilla client do they show a failure with PASV mode, and switching to Active FTP? If so that explains why the Filezilla client works and the code above doesn't, as Filezilla can automatically switch between passive and active mode by default.

It could be that on Windows 7 you are seeing the effects of a bug in the passive mode FTP handling, there is a hotfix available here: . Another workaround is to ensure that the network stack driver is IPv4 only, not a dual IPv4 and IPv6 stack.

Could also be a firewall issue, the range of dynamic ports used changed from XP where it was in the range 1024-5000, from Vista onwards the range for passive ftp is 49152-65535 , see for details. If there's a firewall between the customer and the ftp server restricting the allowed port range, the firewall may need to be reconfigured, however I'd expect this to have also been an issue with the Filezilla client on the same Windows 7 PCs.



I think the problem is related to the dual IPv4 and IPv6 stack issue because the firewall is not the problem since the issue remains even with the firewall disabled and Filezilla is not switching to active mode. The passive port range is set by our tech. support.