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:
ChilkatLog: GetFile: DllDate: Mar 27 2014 ChilkatVersion: 220.127.116.11 UnlockPrefix: SIMONWFTP Username: DELLXPS:Simon Architecture: Little Endian; 32-bit Language: ActiveX VerboseLogging: 0 ProgressMonitoring: enabled: yes heartbeatMs: 0 sendBufferSize: 65536 --ProgressMonitoring AutoGetSizeForProgress: 0 downloadToFile: localFilename: c:\temp\FC042015.153 downloadToOutput: ModeZ: 0 BinaryMode: 1 setupDataConnection: passive transfer mode setupPassiveDataSocket: sendCommand: sendingCommand: PASV --sendCommand readCommandResponse: replyLineQP: 227 Entering Passive Mode (10,100,43,99,19,169) commandResponse: 227 Entering Passive Mode (10,100,43,99,19,169) statusCode: 227 --readCommandResponse dataConnect: hostname: 10.100.43.99 port: 5033 connect2: failReason2: 7 --connect2 dataConnectSuccess: 0 --dataConnect setupPassiveDataSocket dataConnect failed. --setupPassiveDataSocket Failed to setup passive data socket for upload --setupDataConnection --downloadToOutput --downloadToFile TotalTimeMs: Elapsed time: 21046 millisec Failed. --GetFile --ChilkatLog
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: https://support.microsoft.com/en-us/kb/2754804 . 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 https://support.microsoft.com/en-us/kb/929851 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.
answered Apr 22 '15 at 03:46
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.
answered Apr 22 '15 at 10:04