After 2 days of trying various things, I'm in need of some assistance. I'm trying to setup an FTP/SSL connection in passive mode, with implicit security. I am using a Verifier.vb class to handle verification of the certificate, which seems to be working ok. I just can't get past the .login call. I've verified the credentials, they are correct. To test the connection outside of Rebex, I used Adobe Dreamweaver's FTP, and it does connect just fine. However, there is an additional option on Dreamweaver called Authentication which is set up "None (encryption only)". I couldn't find anything related to this in Rebex, but I could have missed it.
Anyway, any help is greatly appreciated. :)
Here is the code:
'create client, connect and log in
Dim ftpClient As New Ftp
ftpClient.LogWriter = New Rebex.FileLogWriter("E:\connection.log", Rebex.LogLevel.Debug)
If ftpServer.IsPassiveMode = False Then ftpClient.Passive = False
' // VALIDATE CERTIFICATE AND CONNECT
AddHandler ftpClient.ValidatingCertificate, AddressOf Verifier.ValidatingCertificate
ftpClient.Connect(ftpServer.Address, 990, FtpSecurity.Implicit)
' // LOGIN
ftpClient.Login(ftpServer.Username, ftpServer.Password)
ftpClient.SecureTransfers = True
'change to the subdirectory if applicable
If ftpServer.FtpDirectory <> "" Then ftpClient.ChangeDirectory("/" & ftpServer.FtpDirectory)
Dim shortFileName As String = Path.GetFileName(fileName)
ftpClient.PutFile(fileName, shortFileName)
ftpClient.Disconnect()
The program fails on ftpClient.Login call.
Here is the log:
2013-02-14 11:15:06.460 Opening log file
2013-02-14 11:15:06.499 INFO Ftp(1)[1] Info: Connecting to youearnedit-ftp.cloudapp.net:990 using Ftp 4.0.4700.0.
2013-02-14 11:15:06.501 INFO Ftp(1)[1] Info: Using proxy none.
2013-02-14 11:15:06.661 DEBUG Ftp(1)[1] Info: Connection succeeded.
2013-02-14 11:15:06.668 DEBUG Ftp(1)[1] Info: Upgrading control connection to TLS/SSL.
2013-02-14 11:15:06.721 INFO Ftp(1)[1] TLS: State StateChange:Negotiating
2013-02-14 11:15:06.722 DEBUG Ftp(1)[1] TLS: HandshakeMessage:ClientHello was sent.
2013-02-14 11:15:06.809 DEBUG Ftp(1)[1] TLS: HandshakeMessage:ServerHello was received.
2013-02-14 11:15:06.815 DEBUG Ftp(1)[1] TLS: HandshakeMessage:Certificate was received.
2013-02-14 11:15:06.815 DEBUG Ftp(1)[1] TLS: HandshakeMessage:ServerHelloDone was received.
2013-02-14 11:15:06.820 DEBUG Ftp(1)[1] TLS: Verifying server certificate ('CN=YouEarnedIt.FTP').
2013-02-14 11:15:06.828 DEBUG Ftp(1)[1] TLS: Certificate verification result: Accept
2013-02-14 11:15:06.893 DEBUG Ftp(1)[1] TLS: HandshakeMessage:ClientKeyExchange was sent.
2013-02-14 11:15:06.922 DEBUG Ftp(1)[1] TLS: CipherSpec:ChangeCipherSpec was sent.
2013-02-14 11:15:06.927 DEBUG Ftp(1)[1] TLS: HandshakeMessage:Finished was sent.
2013-02-14 11:15:06.984 DEBUG Ftp(1)[1] TLS: CipherSpec:ChangeCipherSpec was received.
2013-02-14 11:15:06.987 DEBUG Ftp(1)[1] TLS: HandshakeMessage:Finished was received.
2013-02-14 11:15:06.989 INFO Ftp(1)[1] TLS: State StateChange:Secured
2013-02-14 11:15:06.991 INFO Ftp(1)[1] TLS: Connection secured using cipher: TLS 1.0, RSA, 128bit AES in CBC mode, SHA1
2013-02-14 11:15:06.996 DEBUG Ftp(1)[1] TLS: Session ID:
0000 |21-39-00-00-07-B6-2D-CB E9-49-26-E3-C9-66-EF-38| !9....-..I&..f.8
0010 |96-53-CE-6F-57-82-E6-33 D3-B8-D4-2C-00-33-FD-27| .S.oW..3...,.3.'
2013-02-14 11:15:06.996 DEBUG Ftp(1)[1] Info: Control connection upgraded to TLS/SSL.
2013-02-14 11:15:07.237 INFO Ftp(1)[1] Response: 220 FTP to Windows Azure Blob Storage Bridge Ready
2013-02-14 11:15:07.259 INFO Ftp(1)[1] Command: USER ftp-xxxxx
2013-02-14 11:15:07.309 INFO Ftp(1)[1] Response: 331 User ftp-xxxxx logged in, needs password
2013-02-14 11:15:07.311 INFO Ftp(1)[1] Command: PASS *****************
2013-02-14 11:15:07.362 INFO Ftp(1)[1] Response: 530 Username or password incorrect ##.###.###.###
2013-02-14 11:15:07.369 ERROR Ftp(1)[1] Info: Rebex.Net.FtpException: Username or password incorrect ##.###.###.### (530).
at Rebex.Net.Ftp.21klJqZ(String , String , String )
And lastly, here is a screen shot of the Dreamweaver ftp that does connect: