Topic "Error - Element already read to the end"

Author Message
eb
[View user's profile]

Joined: 2015-08-27
Posts: 4
Hi,

I am running .NET assembly v5.5.6.
I am receiving the following error message "Element already read to the end)(Boolean Read(WinSCP.LogReadFlags))" when I try to create a remote directory or upload a file to the remote server.
I don't understand what this message means nor what I should do to prevent it.
Please, could you help ?
Thank you.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Can you reproduce the problem with the latest version of WinSCP .NET assembly (5.7.5)?
eb
[View user's profile]

Joined: 2015-08-27
Posts: 4
prikryl wrote:
Can you reproduce the problem with the latest version of WinSCP .NET assembly (5.7.5)?


I reproduced the problem with the latest version (5.7.5).
It looks like it has something to deal with the remote server unexpectedly closing the network connection...
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Please attach a full debug and session log files showing the problem (using the latest version of WinSCP).

To generate log files, set Session.DebugLogPath and Session.SessionLogPath. Submit the log with your post as an attachment. You may want to remove 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.
eb
[View user's profile]

Joined: 2015-08-27
Posts: 4
prikryl wrote:
Please attach a full debug and session log files showing the problem (using the latest version of WinSCP).

To generate log files, set Session.DebugLogPath and Session.SessionLogPath. Submit the log with your post as an attachment. You may want to remove 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.


Actually, I changed my program so that it opens and closes sessions for every single file to transfer. Since it has to find among numbers of files those to be uploaded to the remote server, the elapsed time between two transfers could be long. Increasing the timeout option (up to 2 hours) didn't fix the problem so I assumed that opening/closing sessions could fix the problem of the remote server closing unexpectedly the connection. So far, it's ok.

By the way, password can be found in the debug log file at the lines beginning with "Scheduling output: [winscp> open..." and "Output: [winscp> open...".
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Can you provide me the logs for the original code anyway (without passwords of course).
eb
[View user's profile]

Joined: 2015-08-27
Posts: 4
prikryl wrote:
Can you provide me the logs for the original code anyway (without passwords of course).


I am sorry but I was not granted to provide you with the logs.
Reading again the old code, I found an error that could explain the problem, mainly the fact that the "opened" property turn to "false" did not lead to reconnect the disconnected session so the "RemoteSessionException" : some confusion between "|" and "||".

Opening and closing the session for every single file transfer (new code) fixed that situation.

Thank you for your help.
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