Post a reply

Options
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)

Options

Topic review

Guest

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!
martin

Re: SCP in a .Net night job has stopped working

The error message says it, the FtpSecure is not used with SFTP protocol. Just remove the line FtpSecure = FtpSecure.Implicit.

The code could have never worked.
Waltman

SCP in a .Net night job has stopped working

I have a file transfer I make each night. It's been running well for a little while now. But I've moved the job to a new server, now it's erroring out. The message is "SessionOptions.FtpSecure is not FtpSecure.None, but SessionOptions.Protocol is not Protocol.Ftp." Here are my Session.Options

               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,
               };


I've been on this all day long and can't make heads nor tails of it. Is there anything I can do? I've updated to 5.9.3 hoping it would fix it. It did not.