Topic "ExplicitTls..."

Author Message
[View user's profile]

Joined: 2013-03-27
Posts: 1
Location: Work
Does anyone have an example on how to connect using SessionOptions and ExplicitTLS? I get a connection failed when I do this:

using WinSCP;
public static List<FtpDirectoryListing> GetFiles()
SessionOptions sessionOptions = new SessionOptions
Protocol = Protocol.Ftp,
HostName = ConfigurationManager.AppSettings["FTP"],
UserName = ConfigurationManager.AppSettings["User"],
Password = ConfigurationManager.AppSettings["Password"],
SslCertificate = "xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xxx:xx:xx:xx:xx:xx:xx:xx",
FtpSecure = FtpSecure.ExplicitTls

Console.WriteLine("HostName: " + sessionOptions.HostName);
Console.WriteLine("Password: " + sessionOptions.Password);
Console.WriteLine("UserName: " + sessionOptions.UserName);
Console.WriteLine("FTPSecure: " + FtpSecure.ExplicitTls);
Console.WriteLine("SSLCertificate: " + sessionOptions.SslCertificate);

using (Session session = new Session())
//connect in

Thank you in advance,

Of course as soon as I post this, I figured it out. This does work, but the problem was with the naming convention of the host name, this went from a web services connection to having to use winscp, the older name was I renamed it to I found the correct certificate by running the WinSCP client with the correct parameters and going to commands=>Server/protocol information after connection was established.


You can post new topics in this forum

Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License