I am using Fluent Ftp to send a file to the server I am connecting fine using quick connect in filezilla but in my code am getting a time out error.
public bool SendFileToFtp(List<FtpFiles> _files)
{
//create an FTP client
string ftpHost = Properties.Settings.Default.ftpHost;
string ftpUserName = Properties.Settings.Default.ftpUser;
string ftpPassword = Properties.Settings.Default.ftpPassword;
FtpClient client = new FtpClient(ftpHost);
client.Credentials = new NetworkCredential(ftpUserName, ftpPassword);
client.Connect();
client.SetWorkingDirectory("/in/input");
foreach (FtpFiles file in _files)
{
client.UploadFile(file.FileName, Path.GetFileName(file.FileName));
}
}
I added the following based of another so but it did not work and not allow me to connect to the end user ftp but can through filezilla.
client.EncryptionMode = FtpEncryptionMode.Implicit;
client.SslProtocols = SslProtocols.Tls12;
Exact Error is above