I thought the same thing, but that's what was in the "live' branch in TFS. Either way, I simplified the options and it's working fine now. Thanks!
- Guest
FtpSecure
is not used with SFTP protocol. Just remove the line FtpSecure = FtpSecure.Implicit
.
sessionOptions = new SessionOptions
{
Protocol = Protocol.Sftp,
HostName = ConfigurationManager.AppSettings["BBTAddress"],
UserName = ConfigurationManager.AppSettings["Username"],
Password = ConfigurationManager.AppSettings["Password"],
PortNumber = Convert.ToInt32(ConfigurationManager.AppSettings["Port"]),
SshHostKeyFingerprint = ConfigurationManager.AppSettings["sFTPServerKey"],
GiveUpSecurityAndAcceptAnyTlsHostCertificate = true,
FtpSecure = FtpSecure.Implicit,
};