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

    I am unable to get the SSL example code working. It always fails at the line “client.EndConnect(result)” with the error of “The command socket was disconnected from the FTP server.”

    If I Change the AuthenticationMode to None on the BeginConnection() it will successfully connect. However, once it reach client.Login() it fails and returns the error “Non SSL connections forbidden”.

    Any suggestions?

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

    User (Old forums)
    Member
    Post count: 23064

    I suggest that you set the TraceWriter property, and that you send the resulting log to support@xceedsoft.com, so we can investigate further the issue.

    Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by André (had 405 views)

    User (Old forums)
    Member
    Post count: 23064

    Was there ever any progress made on this problem? I’m experiencing the same thing.

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

    User (Old forums)
    Member
    Post count: 23064

    I was finally able to get this working by changing the example to do the SSL authorization AFTER logging in to the FTP. I do have a functional application now so if you’re still having troubles I may be able to help you troubleshoot.

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

    User (Old forums)
    Member
    Post count: 23064

    If you could post an example of that, I would really appreciate it.

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

    User (Old forums)
    Member
    Post count: 23064

    I don’t know that this will work in all cases, but I can assure you this is working for me and the site Im connecting to. Let me know how it goes! Good Luck!

    Dim client As New AsyncFtpClient()
    AddHandler client.CertificateReceived, AddressOf certificate_received

    Dim result As IAsyncResult = client.BeginConnect(“[SERVERADDRESS]”, [SERVERPORT], AuthenticationMethod.None, VerificationFlags.None, Nothing, Nothing, Nothing)

    While Not result.IsCompleted
    Application.DoEvents()
    End While

    client.EndConnect(result)
    client.Authenticate(AuthenticationMethod.Ssl, VerificationFlags.None, Nothing, DataChannelProtection.Private)

    client.Login(“[USERNAME]”, “[PASSWORD]”)
    ‘Do whatever here….
    client.Disconnect()
    RemoveHandler client.CertificateReceived, AddressOf certificate_received

    Private Sub certificate_received(ByVal sender As Object, ByVal e As CertificateReceivedEventArgs)
    If e.Status <> VerificationStatus.ValidCertificate Then
    e.Action = VerificationAction.Accept
    Else
    Console.WriteLine(“Valid certificate received from server.”)
    End If
    End Sub

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

    User (Old forums)
    Member
    Post count: 23064

    Thanks to your example I got it to work! I had to modify your example a bit: after setting the server port to 990 (Passive SSL connection), I was able to remove the client.Authenticate call and now it works!

    Thanks for your help, you saved me several hours of trial and error! 😀

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

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