Topic "Net assembly working in background thread"

Author Message
kaheiho
[View user's profile]

Joined: 2014-09-28
Posts: 2
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:

Code:

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!!! Very Happy

Many thanks for your posts!
kaheiho
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
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.
_________________
Martin Prikryl
kaheiho
[View user's profile]

Joined: 2014-09-28
Posts: 2
prikryl 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
MoveFtpFiles.zip (8.63 KB) Private file

Description: containes files mentioned above

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
I have sent you an email with a debug version of WinSCP to address you have used to register on this forum.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License