Welcome to the Xceed Community | Help
Community Search  

SSL: command socket was disconnected from the FTP server

Sort Posts: Previous Next
  •  12-03-2007, 2:24 PM Post no. 5284

    SSL: command socket was disconnected from the FTP server

    For some reason, I can't seem to get an SSL ftp connection to work. I am able to hit the site using both CoreFTP and the FireFTP plugin for Firefox. But, when I try to connect using xceed, I get the output below (trace enabled). I added a logger for the Command sent event, but nothing is being sent. The site is using a self issued certificate, but I think that I am allowing if with the flags passed in the Call to connect.

    <b>Output
    -------------------------------------------------</b>
    Connected to 207.24.42.24:21 on 12/3/2007 @ 2:06:33 PM
    Disconnected from 207.24.42.24:21 on 12/3/2007 @ 2:06:33 PM


    <b>StackTrace:
    -------------------------------------------------</b>
    at Xceed.Ftp.Engine.ConnectFtpCommand.EndExecute(IAsyncResult asyncResult)
    at Xceed.Ftp.FtpClient.Connect(FtpCommandChannel commandChannel, ConnectFtpCommand command)
    at Xceed.Ftp.FtpClient.Connect(String hostName, Int32 port, AuthenticationMethod authenticationMethod, VerificationFlags verificationFlags, Certificate clientCertificate)
    at RCS.Forms.Test.FileGenerator.button1_Click(Object sender, EventArgs e)


    <b>Source Code
    -------------------------------------------------</b>
    Xceed.Ftp.FtpClient ftp = new Xceed.Ftp.FtpClient();
    ftp.TraceWriter = Console.Out;
    ftp.CommandSent += new Xceed.Ftp.CommandSentEventHandler(ftp_CommandSent);
    ftp.CertificateReceived += new Xceed.Ftp.CertificateReceivedEventHandler(ftp_CertificateReceived);
    ftp.CertificateRequired += new Xceed.Ftp.CertificateRequiredEventHandler(ftp_CertificateRequired);

    <b>// THIS LINE THROWS THE EXECEPTION:</b>
    ftp.Connect(textBoxFtpHost.Text, 21, Xceed.Ftp.AuthenticationMethod.Tls,
    Xceed.Ftp.VerificationFlags.AllowUnknownCA | Xceed.Ftp.VerificationFlags.AllowTestRoot
    | Xceed.Ftp.VerificationFlags.TrustTestRoot
    , null);



  •  12-03-2007, 3:55 PM Post no. 5285 in reply to 5284

    Re: SSL: command socket was disconnected from the FTP serve

    Tech support recommended that I split the Connect and Authenticate into two steps and that fixed my problem.


    ftp.Connect(textBoxFtpHost.Text, 21);
    ftp.Authenticate(Xceed.Ftp.AuthenticationMethod.Tls,
    Xceed.Ftp.VerificationFlags.AllowUnknownCA
    | Xceed.Ftp.VerificationFlags.AllowTestRoot
    | Xceed.Ftp.VerificationFlags.TrustTestRoot,
    null,
    Xceed.Ftp.DataChannelProtection.Private);

    ftp.Login(...., ....);
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.