Home Forums .NET libraries Xceed SFTP/FTP for .NET The handshake failed due to unexpected error format

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #21259 |

    Hi

    I am using a simple ftpclient  connect call to the server

     http://ftp.Connect(“localhost”, 21, AuthenticationMethod.Ssl, VerificationFlags.AllFlags, null);

     

    but
    get this error “Handshake failed due to unexpected error format” with
    details saying {“An error occurred while creating the SslStream.”}

    I
    have tried connecting to many servers like filezilla, win2k3, win2k8
    new ftp service but with explicit ssl  everytime same error comes
    though implicit ssl connection with port 990 seems to work fine.

    Has anyone seen this issue and can suggest the fix..it is urgent

    Thanks

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

    User (Old forums)
    Member
    Post count: 23064

    Hi,

    You should try to using “VerificationFlags.None” to make sure that you can connect.  We know that there is a cast problem with the VerificationFlags class and this problem should fixed next week in a service release. 

    Best regards,

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

    User (Old forums)
    Member
    Post count: 23064

    Hi Ghislain,

    I’m using Xceed FTP 4.1 . I’m trying to connect FTP server which is hosted on WIndows Server 2008. I can able to transfer the file with normal FTP, but when I’m trying with SSL, its throwing below error…

    The handshake failed due to an unexpected packet format.

    SslStream authentication failed. Possible causes: 1) The server requires a certificate in order to connect and none was provided. 2) The certificate provided was rejected by the .NET framework/Windows (usually because it doesn’t contain a private key). 3) The certificate provided was rejected by the server.

    Here is my code:

    using

    XFTP = Xceed.Ftp;

    XFTP.

    AsyncFtpClient ftpClienti = new Xceed.Ftp.AsyncFtpClient();

    ftpClienti.PassiveTransfer = true;

    ftpClienti.CertificateReceived += new XFTP.CertificateReceivedEventHandler(certificate_received);

    ftpClienti.Connect(“server”, 990, XFTP.AuthenticationMethod.Tls, XFTP.VerificationFlags.None, null);

    ftpClienti.Login(FtpUsername, FtpPassword);

    I have installed the FTP SSL certificate also.. still its throwing SslStream authentication failed exception.

    Can you please help on this?

     

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

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