Getting
Timed out trying to read data from the socket stream!
when connecting to FTP using FluentFTP.
Below is the sourc
In FileZilla, you are connecting to implicit FTPS port 990.
If you also use this port in C#, you cannot use FtpEncryptionMode.Explicit
.
Use FtpEncryptionMode.Implicit
.
Though you better connect to port 21 and keep using FtpEncryptionMode.Explicit
, if that port is available.
The following code is all you need to get FluentFtp (at least nuget (1.0.5824.34026) to use secure connection .
FtpClient fclient = new FtpClient(hostname, username, password); // or set Host & Credentials
fclient.EncryptionMode = FtpEncryptionMode.Implicit;
fclient.SslProtocols = SslProtocols.Tls12;
//client.Port = 990; // Not required - probably gives you exceptions if you try to set it.
fclient.Connect();
fclient.UploadFile(@"C:\tmp\a.txt", "big.txt");