private Task DownloadVersionItemAsync(string version, string filename, string downloadPath) { FluentFTP.FtpTrace.LogToFile = "log_FluentFTP_actions.logs"; FluentFTP.FtpTrace.LogUserName = false; // hide FTP user names FluentFTP.FtpTrace.LogPassword = false; // hide FTP passwords FluentFTP.FtpTrace.LogIP = true; // hide FTP server IP addresses //var client = new FluentFTP.FtpClient(_ftpUpdaterOptions.Host, _ftpUpdaterOptions.Username, _ftpUpdaterOptions.Password); //FluentFTP.FtpVerify.Retry | FluentFTP.FtpVerify.Delete | FluentFTP.FtpVerify.Throw var client = new FluentFTP.FtpClient(_ftpUpdaterOptions.Host, _ftpUpdaterOptions.Username, _ftpUpdaterOptions.Password); client.EncryptionMode = FtpEncryptionMode.None; if (_ftpUpdaterOptions.TrustClientCertificate) { client.ValidateCertificate += Client_ValidateCertificate; } //client.SslProtocols = System.Security.Authentication.SslProtocols.Tls12 | System.Security.Authentication.SslProtocols.Ssl2; var ftpFolder = $"{_ftpUpdaterOptions.FtpFolderHostingTheApp}/{version}"; var ftpFolderAndFile = $"{ftpFolder}/{filename}"; //var lst = client.GetListing(); return(client.DownloadFileAsync(downloadPath, ftpFolderAndFile, FluentFTP.FtpLocalExists.Overwrite, FluentFTP.FtpVerify.Delete | FluentFTP.FtpVerify.Throw, defaultProgress)); }