Topic "Error - "Element already read to the end " - winscpnet.dll"

Author Message
Adrian_Saracila
[View user's profile]

Joined: 2014-01-29
Posts: 2
Hi,

First of all, congratulations for your wonderful work with WinSCP!

I use winscpnet.dll in a SQL Server Integration Service package, in a Dataflow task, specifically in a Script Component (transformation component).
The protocol is FTP.
The DataFlow task downloads a variable number of files using this Script component (code similar with what you have for SSIS in samples).
The session is created/opened in PreExecute() and closed in PostExecute() methods of script component.
Multiple instances of the package can run simultaneously, downloading different files from the FTP server at the same time.

On production server we receive "Element already read to the end" errors from time to time. We have to retry the download for the files affected in a later package schedule run.
Maybe you have an idea what is the cause of these errors and how I can avoid these?

Thank you!
Regards,
Adrian
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Please attach a full session and debug log files showing the problem (using the latest version of WinSCP).

To generate log files, set Session.SessionLogPath and Session.DebugLogPath. Submit the logs with your post as an attachment. You may want to remove data you consider sensitive, 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 may email it to me. You will find my address (if you log in) in my forum profile. Please include link back to this topic in your email. Also note in this topic that you have emailed the log.

_________________
Martin Prikryl
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
A root cause of the problem is that your server terminates connection for some reason.
WinSCP .NET assembly does not properly detect that and on subsequent call to Session.FileExists (when session is closed already) fails with cryptic error.

Request to improve this was added to tracker:
http://winscp.net/tracker/show_bug.cgi?id=1137
Adrian_Saracila
[View user's profile]

Joined: 2014-01-29
Posts: 2
Thank you for your response!

Regards,
Adrian
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