Getting TLS exception

0 votes
asked Mar 23, 2020 by Uwe Keim (1,070 points)

I'm getting:

Error while processing TLS packet: Rebex.Net.TlsException: Fatal error 'ProtocolVersion' has been reported by the remote connection end.

when connecting to an FTP host.

Here is the log file. (Sorry not able to post here directly because of your post character limit)

With e.g. FileZilla the connection works correctly.

My question:

Any idea what's going on and what we are doing wrong?

1 Answer

+1 vote
answered Mar 23, 2020 by Lukas Matyska (61,230 points)
selected Mar 24, 2020 by Uwe Keim
Best answer

The 'ProtocolVersion' error typically means that the client and server uses different versions of the TLS protocol.

The TLS protocol version can be set using the Ftp.Settings.SslAllowedVersions property.

By default, TlsVersion.TLS12 is included. However, it seems you explicitly disabled it byt setting the Ftp.Settings.SslAllowedVersions property to a lower version(s).

To make your code working, either don't modify the Ftp.Settings.SslAllowedVersions property or enable TLS 1.2 like this:

var client = new Ftp();
client.Settings.SslAllowedVersions = TlsVersion.TLS12;
commented Mar 24, 2020 by Uwe Keim (1,070 points)
Thank you very much, Lukas.