Error: Peer certificate rejected – How do I accept the certificate?
I've just begun using WinSCP today I've successfully connected from WinSCP GUI now I'm trying to automate things using C# .NET and now I'm stuck with this error:
private void button1_Click(object sender, System.EventArgs e) { SessionOptions sessionOptions = new SessionOptions { Protocol = Protocol.Ftp, HostName = "1.2.3.4", PortNumber = 990, UserName = "username", Password = "password", FtpSecure = FtpSecure.Implicit, }; using (Session session = new Session()) { session.Open(sessionOptions); TransferOptions transferOptions = new TransferOptions(); transferOptions.TransferMode = TransferMode.Binary; TransferOperationResult transferResult; transferResult = session.GetFiles("/BackupLogs/*", @"C:\InternalShortcuts\BackupLogs\", false, transferOptions); transferResult.Check(); foreach (TransferEventArgs transfer in transferResult.Transfers) { Console.WriteLine("Download of {0} succeeded", transfer.FileName); } } }