FluentFTP
FluentFTP copied to clipboard
GetListing - One or more errors occurred. ( Received an unexpected EOF or 0 bytes from the transport stream.)
FTP OS: Unix / Windows / Embedded
FTP Server: FileZilla Server 0.9.60
Computer OS: Windows 10
FluentFTP Version: 40.0
Framework: .NET 6
Hi - we have an problem with an FTP Server - where GetListing does throw an exception. Any ideas?
System.AggregateException: "One or more errors occurred. ( Received an unexpected EOF or 0 bytes from the transport stream.)"
System.Private.CoreLib.dll!System.Threading.Tasks.Task.ThrowIfExceptional(bool includeTaskCanceledExceptions) Zeile 1883 C#
System.Private.CoreLib.dll!System.Threading.Tasks.Task.Wait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) Zeile 2733 C#
System.Private.CoreLib.dll!System.Threading.Tasks.Task.Wait() Zeile 2607 C#
[Warten auf asynchronen Vorgang, Doppelklick oder EINGABE zur Anzeige asynchroner Aufruflisten]
FluentFTP.dll!FluentFTP.FtpSocketStream.ActivateEncryption(string targethost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCerts, System.Security.Authentication.SslProtocols sslProtocols) Unbekannt
FluentFTP.dll!FluentFTP.FtpClient.OpenPassiveDataStream(FluentFTP.FtpDataConnectionType type, string command, long restart) Unbekannt
FluentFTP.dll!FluentFTP.FtpClient.OpenDataStream(string command, long restart) Unbekannt
FluentFTP.dll!FluentFTP.FtpClient.GetListingInternal(string listcmd, FluentFTP.FtpListOption options, bool retry) Unbekannt
FluentFTP.dll!FluentFTP.FtpClient.GetListing(string path, FluentFTP.FtpListOption options) Unbekannt
FluentFTP.dll!FluentFTP.FtpClient.GetListing() Unbekannt
FluentExample.dll!FluentFTPTest.FluentFTP_Error1() Zeile 22 C# FluentExample.dll!Program.<Main>$(string[] args) Zeile 4 C#
Logs :
# AutoConnect()
# AutoDetect(True, False)
# Connect()
Status: Connecting to ***:21
Response: 220 FileZilla Server 0.9.60 beta written by Tim Kosse ([email protected]) Please visit http://sourceforge.
Status: Detected FTP server: FileZilla
Command: AUTH TLS
Response: 234 Using authentication type TLS
Status: FTPS Authentication Successful
Status: Time to activate encryption: 0h 0m 0s. Total Seconds: 0,1323288.
Command: USER ***
Response: 331 Password required for ***
Command: PASS ***
Response: 230 Logged on
Command: PBSZ 0
Response: 200 PBSZ=0
Command: PROT P
Response: 200 Protection level set to P
Command: FEAT
Response: 211-Features:
Response: MDTM
Response: REST STREAM
Response: SIZE
Response: MLST type*;size*;modify*;
Response: MLSD
Response: AUTH SSL
Response: AUTH TLS
Response: PROT
Response: PBSZ
Response: UTF8
Response: CLNT
Response: MFMT
Response: EPSV
Response: EPRT
Response: 211 End
Status: Text encoding: System.Text.UTF8Encoding+UTF8EncodingSealed
Command: OPTS UTF8 ON
Response: 202 UTF8 mode is always enabled. No need to send this command.
Command: SYST
Response: 215 UNIX emulated by FileZilla
Status: Listing parser set to: Machine
# SetWorkingDirectory("OUT")
Command: CWD OUT
Response: 250 CWD successful. "/OUT" is current directory.
# GetListing(null, Auto)
Command: PWD
Response: 257 "/OUT" is current directory.
Command: TYPE I
Response: 200 Type set to I
# OpenPassiveDataStream(PASV, "MLSD /OUT", 0)
Command: PASV
Response: 227 Entering Passive Mode (94,186,230,134,55,109)
Status: Connecting to ***:14189
Command: MLSD /OUT
Response: 150 Opening data channel for directory listing of "/OUT"
Does this occur with previous nugets also? (v39..)
Hi - yes - we currently use v39 - we simply updated to v40 for this sample!
You could verify a few things:
- It works without encryption. If your server enforces encryption, of course you cannot try this.
- Use different listing method instead of MLST. Try
FtpListOption.ForceListorFtpListOption.ForceListinstead and see if there is a change in the behaviour to help finding the problem. - Use the most verbose logging option to get little bit more intermediate information.
- Take a Wireshark trace of this process
- Let's take a look at the FileZilla Server's logs too
@noxe I know you can effectively only try 2, 3, 4 because you have no control over the server. But others reading this who have the same problem might profit
It is as if it can't open any data channel. Probably any kind of data channel. Although the server advertises it can MLSD and MLST, can you try a FtpListOption.ForceList to change the list command being used to LIST, and verifiy that this also fails?
sure ✌️
seems to make no difference? see output:
client.GetListing("OUT", FtpListOption.ForceList);
# OpenPassiveDataStream(PASV, "LIST /OUT", 0)
Command: PASV
Response: 227 Entering Passive Mode (94,186,230,134,55,28)
Status: Connecting to ***:14108
Command: LIST /OUT
Response: 150 Opening data channel for directory listing of "/OUT"
Unhandled exception. System.AggregateException: One or more errors occurred. ( Received an unexpected EOF or 0 bytes from the transport stream.)
---> System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream.
at System.Net.Security.SslStream.<FillHandshakeBufferAsync>g__InternalFillHandshakeBufferAsync|189_0[TIOAdapter](TIOAdapter adap, ValueTask`1 task, Int32 minSize)
at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](TIOAdapter adapter)
at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at FluentFTP.FtpSocketStream.ActivateEncryption(String targethost, X509CertificateCollection clientCerts, SslProtocols sslProtocols)
at FluentFTP.FtpClient.OpenPassiveDataStream(FtpDataConnectionType type, String command, Int64 restart)
at FluentFTP.FtpClient.OpenDataStream(String command, Int64 restart)
at FluentFTP.FtpClient.GetListingInternal(String listcmd, FtpListOption options, Boolean retry)
at FluentFTP.FtpClient.GetListing(String path, FtpListOption options)
at FluentFTPTest.FluentFTP_Error1() in C:\Users\martin\Desktop\FluentExample\FluentExample\Program.cs:line 21
Well, we have learned something (offline): it works when its not .NET 6 - if you use .NET Framework 4.8, no error.
@robinrodricks So now that is at least a little clue as to where to start looking.
Same issue here. The server requires a TLS 1.2 connection, project is using .NET 6.0. I tried different NuGet versions without success. All suggested fixes above also didn't work.
@codengine
All suggested fixes above also didn't work.
You are saying: if you switch to use .NET Framework 4.8, it also does not work?
@codengine
All suggested fixes above also didn't work.
You are saying: if you switch to use .NET Framework 4.8, it also does not work?
With 4.8, the EOF-issue is gone, but I'm also unable to get a file listing. It is just empty. Here is my the code which I use:
var client = new FtpClient("the-host", "user", "pass");
client.ValidateCertificate += (_, e) => { e.Accept = true; };
var ftpProfile = new FtpProfile()
{
Host = client.Host,
Credentials = client.Credentials,
Encoding = Encoding.UTF8,
Protocols = SslProtocols.Tls12,
DataConnection = FtpDataConnectionType.AutoPassive,
Encryption = FtpEncryptionMode.Auto
};
client.Connect(ftpProfile);
var ftpListItems = client.GetListing();
I have to manually accept the certificate as it is self-signed.
@codengine
Using your exact same code agains a filezilla server I get success in both cases:
# Connect()
Status: FluentFTP 42.0.0.0
Status: Connecting to ***:21
Status: Waiting for a response
Response: 220-FileZilla Server 1.5.1
Response: 220-Please visit https://filezilla-project.org/
Response: 220 Welcome to the FileZilla FTP Server
Status: Detected FTP server: FileZilla
Command: AUTH TLS
Status: Waiting for response to: AUTH TLS
Response: 234 Using authentication type TLS.
Status: FTPS authentication successful, protocol = Tls12
Status: Time to activate encryption: 0h 0m 0s. Total Seconds: 0,0645745.
Status: SslStream: Tls12 (Aes256, 44550, 255)
Command: USER ***
Status: Waiting for response to: USER ***
Response: 331 Please, specify the password.
Command: PASS ***
Status: Waiting for response to: PASS ***
Response: 230 Login successful.
Command: PBSZ 0
Status: Waiting for response to: PBSZ 0
Response: 200 PBSZ=0
Command: PROT P
Status: Waiting for response to: PROT P
Response: 200 Protection level set to P
Command: FEAT
Status: Waiting for response to: FEAT
Response: 211-Features:
Response: MDTM
Response: REST STREAM
Response: SIZE
Response: MLST type*;size*;modify*;perm*;
Response: MLSD
Response: AUTH SSL
Response: AUTH TLS
Response: PROT
Response: PBSZ
Response: UTF8
Response: TVFS
Response: EPSV
Response: EPRT
Response: MFMT
Response: 211 End
Status: Text encoding: System.Text.UTF8Encoding
Command: OPTS UTF8 ON
Status: Waiting for response to: OPTS UTF8 ON
Response: 202 UTF8 mode is always enabled. No need to send this command
Command: SYST
Status: Waiting for response to: SYST
Response: 215 UNIX emulated by FileZilla.
Status: Listing parser set to: Machine
# GetListing(null, Auto)
Command: PWD
Status: Waiting for response to: PWD
Response: 257 "/" is current directory.
Command: TYPE I
Status: Waiting for response to: TYPE I
Response: 200 Type set to I
# OpenPassiveDataStream(AutoPassive, "MLSD /", 0)
Command: EPSV
Status: Waiting for response to: EPSV
Response: 229 Entering Extended Passive Mode (|||21163|)
Status: Connecting to ***:21163
Command: MLSD /
Status: Waiting for response to: MLSD /
Response: 150 Starting data transfer.
Status: FTPS authentication successful, protocol = Tls12
Status: Time to activate encryption: 0h 0m 0s. Total Seconds: 0,0029975.
Status: SslStream: Tls12 (Aes256, 44550, 255)
+---------------------------------------+
Listing: type=dir;modify=20220803204744.296;perms=cplem; System Volume Information
Listing: type=dir;modify=20221014135616.210;perms=cplem; temp
Listing: type=dir;modify=20220111125238.171;perms=cplem; VIRTUALBOX
-----------------------------------------
Status: Disposing FtpSocketStream...
# CloseDataStream()
Status: Waiting for a response
Response: 226 Operation successful
Status: Disposing FtpSocketStream...
Works for me with .NET 6 and with .NET Framework 4.8.
Now if you had mentioned your server type (is it also filezilla? Which version?) and also pasted a verbose log, I could try to compare... and we would have two failure logs to learn from instead of just one.
Hi @FanDjango, I'll ask the owner of the FTP if I can get my hands on their logs and details. I'll let you know!
FYI, if that helps, I already know that their server uses explicit SSL over Port 21 and the same issues occured with another FTP library, regardless of 4.8 or 6. However, clients like FileZilla can connect just fine. This is what bothers me :/ Is the Self-Signed Certificate maybe the dealbreaker here?
Here is my client's log, it is identical on 4.8 and 6.0:
> # Connect()
> Status: FluentFTP 42.0.0.0
> Status: Connecting to ***:21
> Status: Waiting for a response
> Response: 220-FileZilla Server 0.9.60 beta
> Response: 220-+++++++++++++++++++++++++++++
> Status: Detected FTP server: FileZilla
> Command: AUTH TLS
> Status: Waiting for response to: AUTH TLS
> Response: 234 Using authentication type TLS
> Warning: SSL Buffering force disabled, is .NET 5.0 and later
> Status: FTPS authentication successful, protocol = Tls
> Status: Time to activate encryption: 0h 0m 0s. Total Seconds: 0,133437.
> Status: SslStream: Tls (Aes256, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, 44550, 256)
> Command: USER ***
> Status: Waiting for response to: USER ***
> Response: 331 Password required for ***
> Command: PASS ***
> Status: Waiting for response to: PASS ***
> Response: 230 Logged on
> Command: PBSZ 0
> Status: Waiting for response to: PBSZ 0
> Response: 200 PBSZ=0
> Command: PROT P
> Status: Waiting for response to: PROT P
> Response: 200 Protection level set to P
> Command: FEAT
> Status: Waiting for response to: FEAT
> Response: 211-Features:
> Response: MDTM
> Response: REST STREAM
> Response: SIZE
> Response: MLST type*;size*;modify*;
> Response: MLSD
> Response: AUTH SSL
> Response: AUTH TLS
> Response: PROT
> Response: PBSZ
> Response: UTF8
> Response: CLNT
> Response: MFMT
> Response: EPSV
> Response: EPRT
> Response: 211 End
> Status: Text encoding: System.Text.UTF8Encoding+UTF8EncodingSealed
> Command: OPTS UTF8 ON
> Status: Waiting for response to: OPTS UTF8 ON
> Response: 202 UTF8 mode is always enabled. No need to send this command.
> Command: SYST
> Status: Waiting for response to: SYST
> Response: 215 UNIX emulated by FileZilla
> Status: Listing parser set to: Machine
>
> # GetListing("", Auto)
> Command: PWD
> Status: Waiting for response to: PWD
> Response: 257 "/" is current directory.
> Command: TYPE I
> Status: Waiting for response to: TYPE I
> Response: 200 Type set to I
>
> # OpenPassiveDataStream(PASV, "MLSD /", 0)
> Command: PASV
> Status: Waiting for response to: PASV
> Response: 227 Entering Passive Mode (x,x,x,x,x,x)
> Status: Connecting to ***:42500
> Command: MLSD /
> Status: Waiting for response to: MLSD /
> Response: 150 Opening data channel for directory listing of "/"
> Warning: SSL Buffering force disabled, is .NET 5.0 and later
This log, thanks! It is NET 6 I can see. Let me check a few things.
Mine looks like this for NET 6:
# OpenPassiveDataStream(AutoPassive, "MLSD /", 0)
Command: EPSV
Status: Waiting for response to: EPSV
Response: 229 Entering Extended Passive Mode (|||21168|)
Status: Connecting to ***:21168
Command: MLSD /
Status: Waiting for response to: MLSD /
Response: 150 Starting data transfer.
Warning: SSL Buffering force disabled, is .NET 5.0 and later
Status: FTPS authentication successful, protocol = Tls12
Status: Time to activate encryption: 0h 0m 0s. Total Seconds: 0,0027796.
Status: SslStream: Tls12 (Aes256, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, 44550, 255)
Yours goes like this:
OpenPassiveDataStream(PASV, "MLSD /", 0)
Command: PASV
Status: Waiting for response to: PASV
Response: 227 Entering Passive Mode (x,x,x,x,x,x)
Status: Connecting to ***:42500
Command: MLSD /
Status: Waiting for response to: MLSD /
Response: 150 Opening data channel for directory listing of "/"
Warning: SSL Buffering force disabled, is .NET 5.0 and later
EPSV vs. PASV ???
You coded AutoPassive, so do I, I used exactly your code.
-
Does FluentFTP have a bug in the PASV code path vs. EPSV? I will go check that kind of idea.
-
For you, could you try to get a force EPSV by
DataConnection = FtpDataConnectionType.EPSVand see if it helps in your case? -
Why we choose PASV instead of EPSV? I will also try to check that...
With EPSV, I get the following output:
# OpenPassiveDataStream(EPSV, "MLSD /", 0)
Command: EPSV
Status: Waiting for response to: EPSV
Response: 229 Entering Extended Passive Mode (|||41708|)
Status: Connecting to ***:41708
Command: MLSD /
Status: Waiting for response to: MLSD /
Response: 150 Opening data channel for directory listing of "/"
Warning: SSL Buffering force disabled, is .NET 5.0 and later
The issue persists. Here is the Stacktrace:
System.Private.CoreLib.dll!System.Threading.Tasks.Task.ThrowIfExceptional(bool includeTaskCanceledExceptions) Unknown
System.Private.CoreLib.dll!System.Threading.Tasks.Task.Wait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) Unknown
[Waiting on Async Operation, double-click or press enter to view Async Call Stacks]
FluentFTP.dll!FluentFTP.FtpSocketStream.ActivateEncryption(string targethost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCerts, System.Security.Authentication.SslProtocols sslProtocols, bool isControlConnection) Unknown
FluentFTP.dll!FluentFTP.FtpClient.OpenPassiveDataStream(FluentFTP.FtpDataConnectionType type, string command, long restart) Unknown
FluentFTP.dll!FluentFTP.FtpClient.OpenDataStream(string command, long restart) Unknown
FluentFTP.dll!FluentFTP.FtpClient.GetListingInternal(string listcmd, FluentFTP.FtpListOption options, bool retry) Unknown
FluentFTP.dll!FluentFTP.FtpClient.GetListing(string path, FluentFTP.FtpListOption options) Unknown
One (stupid) question (sorry I'm not so deep into FTP over TLS), may it be that the authorization is done via TLS, but the data transfer isn't?
As far as I know, the owner of the FTP has a strict encryption rule enforced, in that no unencrypted connections are allowed.
Good question, but it is trying to TLS the data channel:
The message SSL Buffering force disabled.... stems from the ActivateEncryption... process.
I also tried the following settings, didn't help either:
Protocols = SslProtocols.Ssl3 | SslProtocols.Ssl2 | SslProtocols.Tls13 | SslProtocols.Tls12 | SslProtocols.Tls11 |
SslProtocols.Tls,
DataConnection = FtpDataConnectionType.AutoPassive,
Encryption = FtpEncryptionMode.Explicit
and Port 990 with:
Protocols = SslProtocols.Ssl3 | SslProtocols.Ssl2 | SslProtocols.Tls13 | SslProtocols.Tls12 | SslProtocols.Tls11 |
SslProtocols.Tls,
DataConnection = FtpDataConnectionType.AutoPassive,
Encryption = FtpEncryptionMode.Implicit
The latter should also work according to the FTP owner.
It is failing somehow inside FluentFTP.FtpSocketStream.ActivateEncryption(.... Which is more or less directly going to MS .NET code.
I could put some diagnostic code in there to find out more. Must you use Nuget or could you use a special github branch of FluentFTP temporarily to get those changes, if I make them?
I can checkout the source from a special branch and test it there. Just let me know :)
Good. Will take some hours, so by tomorrow
@noxe Hoping to make some progress here, it is the same problem
I find it interesting that your server enforces encryption on connect like this:
Status: FTPS authentication successful, protocol = Tls.
Mine connects and then works as:
Status: FTPS authentication successful, protocol = Tls2.
@noxe can you also present a log from the beginning connect to see the protocol the control channel got?
@noxe can you also try the exact same code as @codengine listed some posts further up, just like I did too?
@noxe can you also present a log from the beginning connect to see the protocol the control channel got?
ssure - here we go:
# AutoConnect()
# AutoDetect(True, False)
# Connect()
Status: Connecting to ***:21
Response: 220 FileZilla Server 0.9.60 beta written by Tim Kosse ([email protected]) Please visit http://sourceforge.
Status: Detected FTP server: FileZilla
Command: AUTH TLS
Response: 234 Using authentication type TLS
Warning: SSL Buffering force disabled, is .NET 5.0 and later
Status: FTPS authentication successful, protocol = Tls12
Status: Time to activate encryption: 0h 0m 0s. Total Seconds: 0,1800536.
Command: USER ***
Response: 331 Password required for ***
Command: PASS ***
Response: 230 Logged on
Command: PBSZ 0
Response: 200 PBSZ=0
Command: PROT P
Response: 200 Protection level set to P
Command: FEAT
Response: 211-Features:
Response: MDTM
Response: REST STREAM
Response: SIZE
Response: MLST type*;size*;modify*;
Response: MLSD
Response: AUTH SSL
Response: AUTH TLS
Response: PROT
Response: PBSZ
Response: UTF8
Response: CLNT
Response: MFMT
Response: EPSV
Response: EPRT
Response: 211 End
Status: Text encoding: System.Text.UTF8Encoding+UTF8EncodingSealed
Command: OPTS UTF8 ON
Response: 202 UTF8 mode is always enabled. No need to send this command.
Command: SYST
Response: 215 UNIX emulated by FileZilla
Status: Listing parser set to: Machine
# SetWorkingDirectory("OUT")
Command: CWD OUT
Response: 250 CWD successful. "/OUT" is current directory.
# GetListing(null, Auto)
Command: PWD
Response: 257 "/OUT" is current directory.
Command: TYPE I
Response: 200 Type set to I
# OpenPassiveDataStream(PASV, "MLSD /OUT", 0)
Command: PASV
Response: 227 Entering Passive Mode (94,186,230,134,55,87)
Status: Connecting to ***:14167
Command: MLSD /OUT
Response: 150 Opening data channel for directory listing of "/OUT"
Warning: SSL Buffering force disabled, is .NET 5.0 and later
Unhandled exception. System.AggregateException: One or more errors occurred. ( Received an unexpected EOF or 0 bytes from the transport stream.)
---> System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream.
at System.Net.Security.SslStream.<FillHandshakeBufferAsync>g__InternalFillHandshakeBufferAsync|189_0[TIOAdapter](TIOAdapter adap, ValueTask`1 task, Int32 minSize)
at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](TIOAdapter adapter)
at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at FluentFTP.FtpSocketStream.ActivateEncryption(String targethost, X509CertificateCollection clientCerts, SslProtocols sslProtocols, Boolean isControlConnection)
at FluentFTP.FtpClient.OpenPassiveDataStream(FtpDataConnectionType type, String command, Int64 restart)
at FluentFTP.FtpClient.OpenDataStream(String command, Int64 restart)
@noxe can you also try the exact same code as @codengine listed some posts further up, just like I did too?
is it possible to share the code - so we are sure to have the same code?
@noxe Tls12, aha. Very good.
var client = new FtpClient("127.0.0.1", "blausere", "blapass");
client.ValidateCertificate += (_, e) => { e.Accept = true; };
var ftpProfile = new FtpProfile() {
Host = client.Host,
Credentials = client.Credentials,
Encoding = Encoding.UTF8,
Protocols = SslProtocols.Tls12,
DataConnection = FtpDataConnectionType.AutoPassive,
Encryption = FtpEncryptionMode.Auto
};
client.Connect(ftpProfile);
var ftpListItems = client.GetListing();
thx - here is the output, same error:
# Connect()
Status: Connecting to ***:21
Response: 220 FileZilla Server 0.9.60 beta written by Tim Kosse ([email protected]) Please visit http://sourceforge.
Status: Detected FTP server: FileZilla
Command: AUTH TLS
Response: 234 Using authentication type TLS
Warning: SSL Buffering force disabled, is .NET 5.0 and later
Status: FTPS authentication successful, protocol = Tls12
Status: Time to activate encryption: 0h 0m 0s. Total Seconds: 0,1345553.
Command: USER ***
Response: 331 Password required for ***
Command: PASS ***
Response: 230 Logged on
Command: PBSZ 0
Response: 200 PBSZ=0
Command: PROT P
Response: 200 Protection level set to P
Command: FEAT
Response: 211-Features:
Response: MDTM
Response: REST STREAM
Response: SIZE
Response: MLST type*;size*;modify*;
Response: MLSD
Response: AUTH SSL
Response: AUTH TLS
Response: PROT
Response: PBSZ
Response: UTF8
Response: CLNT
Response: MFMT
Response: EPSV
Response: EPRT
Response: 211 End
Status: Text encoding: System.Text.UTF8Encoding+UTF8EncodingSealed
Command: OPTS UTF8 ON
Response: 202 UTF8 mode is always enabled. No need to send this command.
Command: SYST
Response: 215 UNIX emulated by FileZilla
Status: Listing parser set to: Machine
# GetListing(null, Auto)
Command: PWD
Response: 257 "/" is current directory.
Command: TYPE I
Response: 200 Type set to I
# OpenPassiveDataStream(AutoPassive, "MLSD /", 0)
Command: EPSV
Response: 229 Entering Extended Passive Mode (|||14150|)
Status: Connecting to ***:14150
Command: MLSD /
Response: 150 Opening data channel for directory listing of "/"
Warning: SSL Buffering force disabled, is .NET 5.0 and later
Unhandled exception. System.AggregateException: One or more errors occurred. ( Received an unexpected EOF or 0 bytes from the transport stream.)
---> System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream.
at System.Net.Security.SslStream.<FillHandshakeBufferAsync>g__InternalFillHandshakeBufferAsync|189_0[TIOAdapter](TIOAdapter adap, ValueTask`1 task, Int32 minSize)
at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](TIOAdapter adapter)
at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
Can you try AutoConnect instead of connect? Or did your previous code use AutoConnect already?