I am trying to connect to a remote server using FTPS. I read online that it can be done using WinSCP but I am unable to make the connection. I am running a .NET Core console application. My code and the error message are below. Thank you in advance for any help you might offer.
Error Message:
Connection failed. Timeout detected. (control connection) Connection failed. You cannot connect to an SFTP server using an FTP protocol. Please select the correct protocol.
SessionOptions sessionOptions = new SessionOptions)
{
Protocol = Protocol.Ftp,
HostName = "xxxxx.com",
UserName = "yyyyyyy",
Password = "************",
FtpSecure = FtpSecure.Explicit,
PortNumber = 30022,
};
session.Open(sessionOptions); // This is where I get the error