Chilkat has prepared very nice set of components for developers, for various platforms. These components are very handy from time to time.

Recently, I was trying to use Chilkat’s FTP component for a project, I got caught in a problem. My attempt to connect to an FTP server keeps failing with “WSAEWOULDBLOCK”. Chilkat component was kind enough to also give me an error documentation URL, which suggested me that either FTP server is unreachable OR some firewall is blocking connection. I verified all possible reasons but those were not the case.

The strange thing was, I was able to connect to other FTP servers but not this one. Upon spending some more time, I found the reason.

By default, Chilkat FTP component uses EPSV (Extended Passive) if Passive mode is enabled. But some FTP servers, which requires passive mode, can’t do well with Extended Passive mode. So I had to disable this Extended Passive mode to get this going. To do so in Chilkat FTP component, use following property.

ftpObj.UseEpsv = False

Happy Coding!