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

SikhSuperman

Just to provide an update in case somebody else runs into issues. I have to say that the 'manifest' error really just went away after doing a clean solution/rebuild project. I believe the winscp assembly is compiled against 'Any Cpu' so, changing between 32bit/64bit should be irrelevant. But, I'm sure Martin will chime in and correct me if I'm wrong.

So, I am compiling my project against 'Any Cpu' and so far the initial test seemed to work.

Thanks!
SS
SikhSuperman

Martin - it looks like this error was resolved when I upgraded. It's hard for me to test, as I don't have physical access to the environment. I rely on log files to troubleshoot.

But, I did end up received the following error:
Could not load file or assembly 'WinSCP, Version=1.0.7.3446, Culture=neutral, PublicKeyToken=b5f19f5762436b89' or one of its dependencies. The module was expected to contain an assembly manifest.


Again, from my reading, it looks like that I am targeting a 64bit when the WinSCP dll is 32bit. I've made the change in my application ('AnyCPU' to 32bit) and will follow up if I was successful.

Thanks again for the help here!!
SS
martin

Did the upgrade help or not?

Are you referring to this bug?
https://winscp.net/tracker/996
If should not apply to you, as you probably did not run WinSCP too many times yet.
SikhSuperman

Thanks Martin - It turned out that my ssh key had an incorrect number in it. :oops: But, I ran into this error:

WinSCP.SessionLocalException: WinSCP process terminated with exit code 3 and output "", without responding (response log file C:\Users\TEMP\AppData\Local\Temp\wscp0AC0.02181261.tmp was not created). This could indicate lack of write permissions to the log folder or problems starting WinSCP itself.

   at WinSCP.Session.Open(SessionOptions sessionOptions)
   at <project>.AppCode.SyncBL.SendFTPFile(String filename, String fileNamePath)


From what I have reading on winscp.com I needed to upgrade. So, I went ahead and upgraded my assembly to 5.5.2 from 5.1.7. Is this all that needs to be done?

Thanks!
SS
martin

Re: Host Key wasn't verified!

SikhSuperman wrote:

Hello - I believe I got everything working, but the issue is that I get the above error with 'Authentication Failed' in my .NET assembly. When I first got the ssh host key fingerprint, I didn't check the box to "cache the key and always trust this host". So, i assume that the host didn't get added to my host's file??

This is irrelevant (unless you set Session.DefaultConfiguration = false, what is not recommended).
What value do you set to SessionOptions.SshHostKeyFingerprint?

Basically, what do I need to do to verify the key again either through scripting or GUI?

You do not. You need to set SessionOptions.SshHostKeyFingerprint correctly.

By the way, when I use 'open <ip address of sftp> -host key ssh rsa xx:xx:xx, etc, I get a 'Host does not exist' and winscp attempts to connect in 4s. I am using 5.x of winscp.

It should be open <ip address of sftp> -hostkey="ssh-rsa 1024 xx:xx:xx"
SikhSuperman

Host Key wasn't verified!

Hello - I believe I got everything working, but the issue is that I get the above error with 'Authentication Failed' in my .NET assembly. When I first got the ssh host key fingerprint, I didn't check the box to "cache the key and always trust this host". So, i assume that the host didn't get added to my host's file??

Basically, what do I need to do to verify the key again either through scripting or GUI? By the way, when I use 'open <ip address of sftp> -host key ssh rsa xx:xx:xx, etc, I get a 'Host does not exist' and winscp attempts to connect in 4s. I am using 5.x of winscp.

Any help is appreciated.

SS