I'm trying to connect to an FTP Server using Fluent FTP. I have no issue using Filezilla when I use Port 22 (SFTP).
However I can't connect to it using Fluent FTP.
var client = new FtpClient(Constants.FtpHost, Constants.FtpUsername, Constants.FtpPassword)
{
// DataConnectionType = FtpDataConnectionType.PASV,
// EncryptionMode = FtpEncryptionMode.Implicit,
// SslProtocols = SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12 | SslProtocols.Tls13,
Port = 22
};
Console.WriteLine("Connecting...");
client.Connect();
Console.WriteLine("Connected");
I Get the following error: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
When I Uncomment DataConnectionType = FtpDataConnectionType.PASV Nothing changes. When I Uncomment EncryptionMode = FtpEncryptionMode.Implicit I Get the following Error: System.IO.IOException: Cannot determine the frame size or a corrupted frame was received.
Once again I have 0 issues with FileZilla or WinSCP.
Any help would be greatly appreciated.