FTP Timeout trying to Connect on Port 990

Question: What is the cause of this error?

ChilkatLog:
  Connect:
    DllDate: Dec  2 2008
    UnlockPrefix: Anything for 30-day trial
    Username: <username>
    Component: .NET 2.0
    Hostname: <hostname>
    Port: 990
    IdleTimeoutMs: 60000
    ConnectTimeout: 60
    HeartbeatMs: 0
    Timeout waiting to read socket or accept connection
    timeoutMs: 60000
    Failed to read FTP response line..
    initialStatus: -1
    initialResponse:
    Failed to connect to FTP server.

Here is my code:

            ftp.Hostname = "<ip>";
            ftp.Username = "<username>";
            ftp.Password = "<password>";
            ftp.Port = 990;
            ftp.AuthTls = false;
            ftp.AuthSsl = true;
 
            success = ftp.Connect();
            if (!success)
            {
                Console.WriteLine(ftp.LastErrorText);
            }
            else
            {
                ftp.Disconnect();
            }

Answer:
Port 990 is for implicit SSL/TLS, where the connection is SSL/TLS from the start. You would set both AuthTls and AuthSsl = false, but set the Ssl property = true. However, it looks like nothing is listening at port 990, so you probably want explicit SSL/TLS. With explicit SSL/TLS you connect on the normal unencrypted FTP port 21 and then the connection is immediately converted to SSL/TLS. In this case, you would set AuthTls or AuthSsl. In most cases it doesn’t matter which. Setting AuthTls causes the Chilkat FTP2 component to send the “AUTH TLS” command to initiate the handshake to convert to a secure channel, the AuthSsl property causes the “AUTH SSL” command to be sent. Some FTP servers require one, some require the other, some accept both (just another annoyance to make FTP more complicated than it needs to be…)

Tags :