Post a reply

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review

Cannot connect to FTPS server

Thank you for your response. You are right. I was fooled because the documentation I received from the company we are trying to send the information to said it was FTPS when in fact it was SFTP. I have made the change and it is working now.

Re: Cannot connect to FTPS server

I believe that the error message is clear. It's not FTPS server, but SFTP server. Even *22 port number suggests that.

If you can connect in WinSCP GUI, the GUI can generate a code template for you:

Cannot connect to FTPS server

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 = "",
    UserName = "yyyyyyy",
    Password = "************",
    FtpSecure = FtpSecure.Explicit,
    PortNumber = 30022,
session.Open(sessionOptions);   // This is where I get the error