I am using the System.Net.FtpClient and I an trying to connect to a server (don't have access to the code in server). when I connect using Winscp/Filezile I succeeded to connect. however when I am using C# I am getting this exception:" 'The remote certificate is invalid according to the validation procedure.'"
not sure what am I doing wrong attaching my code and a photo when I connect using filezila
System.Net.FtpClient.FtpClient _ftpClient = new System.Net.FtpClient.FtpClient();
_ftpClient.Host = Host;
_ftpClient.Port = 990;
_ftpClient.Credentials = new System.Net.NetworkCredential(UserName, Password);
_ftpClient.SslProtocols = System.Security.Authentication.SslProtocols.Tls;
_ftpClient.EncryptionMode = System.Net.FtpClient.FtpEncryptionMode.Explicit;
_ftpClient.Connect();