If the Chilkat FTP2 component fails to establish the data connection when uploading or downloading a file in passive mode using SSL/TLS, then check to see if the host address is reported as 192.168.*.*. If so, it is likely that your NAT router (Network Address Translating Router) was not able to convert the IP address contained within the FTP server’s PASV response from an external IP to an internal IP address. The "192.168″ indicates an internal address. Setting the PassiveUseHostAddr property = true causes the FTP2 component to ignore the IP address returned in the PASV response and use the IP of the existing control connection. (The port number is not ignored.)
Note: You don’t necessarily need to understand that explanation. In summary, if you see "WSAEWOULDBLOCK" and "192.168″ in the LastErrorText, then try setting the PassiveUseHostAddr property = true.
Here’s a sample LastErrorText:
ChilkatLog:
PutFile:
LocalFilename: ***
RemoteFilename: ****
DllDate: Nov 14 2007
Username: ****
Component: .NET 2.0
Passive transfer mode
hostAddr: 192.168.40.162
DataConnect:
hostname: 192.168.40.162
port: 20026
socket is not ready for writing
Connect function failed
SocketError: WSAEWOULDBLOCK The socket would block
Check to make sure the port is not blocked by a firewall.
Failed to setup passive data socket.
Failed.