0 votes
by (120 points)
edited by

I connect to a FTP server (using SslMode.Explicit and TLS 1.3) and I get the following exception when executing GetList() method:

Error while reading data: System.ArgumentException: L'argomento passato non è serializzabile.Nome parametro: value
System.Collections.ListDictionaryInternal.set_Item(Object key, Object value)
Rebex.Net.TlsException.set_loktj(kmfky p0)
Rebex.Net.Tls13.Tls13Exception..ctor(String message, Exception innerException, qgcvu`1 alert)
Rebex.Net.Tls13.Tls13Exception.CreateGeneralTls13Exception(String message, Exception currentException, qgcvu`1 alert)
ojknl.vpfzy.ptayc.hwovk()
ojknl.vpfzy.mdgau(pjhor p0, hzqrh p1)
ojknl.fqxul.<HandleDataFlowError>d__114.fwwna()--- Fine traccia dello stack da posizione precedente dove è stata generata l'eccezione ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
ojknl.kcbxc.<ReceiveCoreAsync>d__26.vumqa()--- Fine traccia dello stack da posizione precedente dove è stata generata l'eccezione ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
ojknl.kcbxc.<BeginReceiveAsync>d__21.fjhnh()--- Fine traccia dello stack da posizione precedente dove è stata generata l'eccezione ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
ojknl.alkdt.<RequestReceiveAsync>d__19.jmson()--- Fine traccia dello stack da posizione precedente dove è stata generata l'eccezione ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
ojknl.wedry.cuwlj(Exception p0)
ojknl.wwxjr.mbdzi(Task p0)
ojknl.jonsc.lynnf(Int32 p0, vmdym p1)
ojknl.jonsc.Poll(Int32 microSeconds, SocketSelectMode mode)
Rebex.Net.TlsSocket.Poll(Int32 microSeconds, SocketSelectMode mode)
ojknl.xpqmv.sznpp(Byte[] p0, Int32 p1, Int32 p2)
ojknl.xpqmv.Read(Byte[] buffer, Int32 offset, Int32 count)

This happens just after having received the list of file; the relevant logs are the following:

Checking incoming data.
Data connection: Alert:CloseNotify was received.
Data connection: Received Alert:CloseNotify, Level:Warning, Source:Remote.
Error while reading data: ...
[...the above exception...]
Data connection failed.
Transfer aborted.
Data connection: Closing TLS socket.

My code is the following:

Ftp ftp = new Ftp();
ftp.Settings.SslAllowedVersions = TlsVersion.Any | TlsVersion.TLS13;
ftp.Connect(uri.Host, uri.Port, SslMode.Explicit);
ftp.Login(username, password);
ftp.ChangeDirectory(uri.AbsolutePath);
FtpItemCollection list = ftp.GetList();

I'm using Rebex.Ftp 7.0.8865 for .NET Standard 2.0 because my application targets .NET Standard 2.0. However, if I use Rebex.Ftp 7.0.8865 for .NET Framework 4.6-4.8, everything works fine; in addition, also using Rebex.Ftp 7.0.8865 for .NET Standard 2.0 but disabling TLS 1.3 works fine, so I'd like to ask:

  1. why Rebex.Ftp 7.0.8865 for .NET Standard 2.0 is not working on this specific server with TLS 1.3? (I've tried other FTP servers and I haven't such problem)
  2. can I safely use Rebex.Ftp 7.0.8865 for .NET Framework 4.6-4.8 in my .NET Standard 2.0 application or there is the chance that some methods will not work?

Thank you very much

Applies to: Rebex TLS, Rebex FTP/SSL

1 Answer

0 votes
by (146k points)

Rebex binaries for .NET Standard 2.0 are not officially supported on .NET Framework. They were previously known to work, but current version apparently suffers from an issue you found.

However, according to our quick investigation of this error, it looks like this particular incompatibility due to our usage of Exception.Data dictionary in Rebex File Transfer Pack is the only showstopper that prevents the binaries for .NET Standard 2.0 from working on .NET Framework 4.7.2 or higher. We'll look into this more thoroughly a hopefully provide a working build next week.

by (120 points)
Thank you very much for your quick response; I'm waiting for updates from you
by (120 points)
Do you already know what the release date of the fix could be?
Thank you very much
by (146k points)
We plan to publish the new version at the end of next week.
If you would like to try a preview build ahead of the release to make sure it works in your environment, please let me know.
by (120 points)
Yes, please, I'd like to try a preview build.
Thank you very much
by (146k points)
I just sent a link to the latest build to your e-mail. Please give it a try and let us know if there are any issues.
...