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:
- 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)
- 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