User (Old forums)MemberJuly 14, 2007 at 2:39 pmPost count: 23064
I’m having some trouble getting a connection to a local FTP server using SSL [explicit]. Specifically, after attempting to authenticate, I get an unhandled FtpSslException w/ a message:
“The other side has sent a failure alert.”
Here is my C# code:
private static void Connect()
AsyncFtpClient client = new AsyncFtpClient();
StringWriter sw = new StringWriter();
client.TraceWriter = sw;
client.PassiveTransfer = true;
client.CertificateReceived += new CertificateReceivedEventHandler(certificate_received);
Certificate clientCert = null;
IAsyncResult result = client.BeginConnect(“192.168.2.106”, null, null);
IAsyncResult result2 = client.BeginAuthenticate(AuthenticationMethod.Ssl, VerificationFlags.None, clientCert, DataChannelProtection.Private, null, null);
client.CertificateReceived -= new CertificateReceivedEventHandler(certificate_received);
private static void certificate_received(object sender, CertificateReceivedEventArgs e)
e.Action = VerificationAction.Accept;
Here is the trace information after executing said code:
Connected to 192.168.2.106:21 on 7/14/2007 @ 11:31:32 AM
< 220 Hello, I’m freeFTPd 1.0
> AUTH SSL
< 234 Go on, authenticate!
> PBSZ 0
Error sending command: An error occured while communicating with the remote host.
Disconnected from 192.168.2.106:21 on 7/14/2007 @ 11:31:33 AM
And this is more information regarding the exception that is thrown at EndAuthenticate:
Xceed.Ftp.FtpSslException: An SSL error occurred while sending a command. —> Xceed.Utils.Security.SecurityException: An error occured while communicating with the remote host. —> Xceed.Utils.Security.Ssl.Shared.SslException: The other side has sent a failure alert.
at Xceed.Utils.Security.Ssl.Shared.HandshakeLayer.ProcessAlert(RecordMessage message)
at Xceed.Utils.Security.Ssl.Shared.HandshakeLayer.ProcessMessages(RecordMessage message)
at Xceed.Utils.Security.Ssl.Shared.RecordLayer.ProcessBytes(Byte buffer, Int32 offset, Int32 size)
at Xceed.Utils.Security.Ssl.Shared.SocketController.OnReceive(IAsyncResult ar)
I’m connecting to a machine local to my network, running freeFTPd + SSL. I am connecting thru port 21 using SSL v3.0.
Implicit SSL connections over prot 990 work great, as does normal FTP over port 21. The only scenario I cannot get working is Exlpicit SSL over port 21.
Much appreciation for any help – been stuck for days on this!
Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by bderosa (had 4003 views)User (Old forums)MemberJuly 14, 2007 at 2:44 pmPost count: 23064
I’d also like to mention that I’m using v3.5.7326.14130
Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by bderosa (had 267 views)Xceed SupportMemberJuly 17, 2007 at 11:54 amPost count: 5658
First, could you try connecting with TLS authentication?
If it still does not work, you could verify if your server is correctly configure to accept explicit connection on port 21. Normally, this should work but it is possible that freeFTPd does not support this type of authentication.
Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by CharlesB (had 3958 views)
- You must be logged in to reply to this topic.