Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

martin

Re: VB code doesn't transfer files, why?

sl8rz wrote:

My open statement is as follows: "open sftp//myUserName:myPassword@ftp://sftp.myPlace.com"

What did you based this syntax on? (asking just so that I can improve the doc if necessary)

Should probably be:
open sftp://myUserName:myPassword@sftp.myPlace.com
or
open sftp://myUserName:myPassword@myPlace.com
sl8rz

Re: VB code doesn't transfer files, why?

martin wrote:

Please start with this FAQ:
https://winscp.net/eng/docs/faq_scheduler

Also temporarily switch to plain text log file to see what's going wrong.



I read through the faq and adopted the "hostkey open" and "certificate open" switches. The result is the same though.
My open statement is as follows: "open sftp//myUserName:myPassword@ftp://sftp.myPlace.com"

Note: I am not running this in a scheduler or on a different machine. This is running in .Net (debug mode) on the same machine that I use to connect using the winSCP GUI.


What am I missing??

Thanks a lot,
David
sl8rz

VB code doesn't transfer files, why?

I've installed winscp (Version 4.3.2_bld_1201) on my desktop (Win XP) and it works fine (I am able to connect to a secure SFTP address, transfer files, etc.). However, when I use WinSCP in my VB code it doesn't move any files up to the ftp site. I believe it connects but can not be sure. The log is created successfully but has no real data in it (just the XML header).


A few points:

* When successfully connecting with the GUI, I have to accept the key being offered by the target sftp site (I just click OK). I'm not sure if my code does this...I haven't coded anything along those lines except for the "option confirm on" in my VB code.

* When running the VB.Net code there's no errors when the winscp object starts, connects or uses the PUT command.

* The log file (log.xml) is created by the VB code , however it only has the basic pre-connection header in it after the whole process finishes.

* The winscp.exitcode always resolves to something other than 0 (an error) but .NET never raises an error.

Note: When successfully connected using the GUI, SFTP-3 is shown as the protocol being used.