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

martin

Re: Net assembly working in background thread

I have sent you an email with a debug version of WinSCP to address you have used to register on this forum.
kaheiho

Re: Net assembly working in background thread

martin wrote:

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate log file, set Session.SessionLogPath. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.


Thank you for your fast reply - I wonder where you take the time!

In our program we have two routines using WinSCP: the first one to be processed dir-lists only the upload-directory of the ftp-server and produces a logfile "WinSCP_GetFtpDirList...log" - see its output in the zipfile, all works well. The second one should download the big images, which is time consuming and therefore should work in the background. With SessinLogPath set I realized, that execution of the routine breaks at line 24 "session.Open(sessionOptions)" - please see attached code "MoveFtpFilesToImpDir.vb" and "MoveFtpFilesToImpDir_20141003-2013.log" in the zipfile.

Many thanks in advance for your advice and best regards!
kaheiho
martin

Re: Net assembly working in background thread

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate log file, set Session.SessionLogPath. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
kaheiho

Net assembly working in background thread

Please apologize me if this is a n00bie question! I have searched this site but didn´t get it.
We use WinScp within a .NET assembly to download regularily many groups of files from ftp-server. In each group is one textfile (small) and two files containing (big) images. We would download the textfiles first and the images in a separate background-thread, because the textfiles contain informations to do further work with the corresponding images of the respective group. This further work should be done while the images are being transferred in the separate background-thread.

We tried to start WinScp like this:

workThread = New Thread(New ThreadStart(AddressOf MoveImages))

workThread.Priority = ThreadPriority.AboveNormal
workThread.Start()


Function MoveImages works well, but if its executed in workThread nothing is downloaded. How can we reach our goal?
And how could we get information about exitcodes WinSCP in this workthread?

And last but not least: the amount of your support is impressing!!! :D

Many thanks for your posts!
kaheiho