Home Forums .NET libraries Xceed SFTP/FTP for .NET SSL: command socket was disconnected from the FTP server

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • User (Old forums)
    Post count: 23064
    #20943 |

    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.

    Connected to on 12/3/2007 @ 2:06:33 PM
    Disconnected from on 12/3/2007 @ 2:06:33 PM

    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
    Xceed.Ftp.FtpClient ftp = new Xceed.Ftp.FtpClient();
    http://ftp.TraceWriter = Console.Out;
    http://ftp.CommandSent += new Xceed.Ftp.CommandSentEventHandler(ftp_CommandSent);
    http://ftp.CertificateReceived += new Xceed.Ftp.CertificateReceivedEventHandler(ftp_CertificateReceived);
    http://ftp.CertificateRequired += new Xceed.Ftp.CertificateRequiredEventHandler(ftp_CertificateRequired);

    http://ftp.Connect(textBoxFtpHost.Text, 21, Xceed.Ftp.AuthenticationMethod.Tls,
    Xceed.Ftp.VerificationFlags.AllowUnknownCA | Xceed.Ftp.VerificationFlags.AllowTestRoot
    | Xceed.Ftp.VerificationFlags.TrustTestRoot
    , null);

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by flahan (had 3635 views)

    User (Old forums)
    Post count: 23064

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

    http://ftp.Connect(textBoxFtpHost.Text, 21);
    | Xceed.Ftp.VerificationFlags.AllowTestRoot
    | Xceed.Ftp.VerificationFlags.TrustTestRoot,

    http://ftp.Login(…., ….);

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by flahan (had 3729 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.