Error - Element already read to the end

Advertisement

eb
Joined:
Posts:
4

Error - Element already read to the end

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.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,469
Location:
Prague, Czechia

Re: Error - Element already read to the end

Can you reproduce the problem with the latest version of WinSCP .NET assembly (5.7.5)?

Reply with quote

eb
Joined:
Posts:
4

Re: Error - Element already read to the end

martin 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...

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,469
Location:
Prague, Czechia

Re: Error - Element already read to the end

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.

Reply with quote

eb
Joined:
Posts:
4

Re: Error - Element already read to the end

martin 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...".

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: Error - Element already read to the end

Can you provide me the logs for the original code anyway (without passwords of course).

Reply with quote

eb
Joined:
Posts:
4

Re: Error - Element already read to the end

martin 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.

Reply with quote

Advertisement

You can post new topics in this forum