After an X amount of time I seem to get disconnected from the server I am connected to. I want to be using some kind of keep alive like that is configurable in WinSCP itself. I have tried adding "/rawsettings PingType=2" (also tried PingType=1) to keep the connection alive, but I do not seem to have any effect when I look at the session log. When I try to list a directory after I seem to have been disconnected I get "Element "files" not found in the log file", which also seems to be a wrong response. What should work?
> 2012-08-21 23:21:45.620 Script: ls -- "/share/MD0_DATA/X250/"
. 2012-08-21 23:21:45.620 Listing current directory.
. 2012-08-21 23:21:45.620 Network error: Software caused connection abort
And from my own application I caught the following:
Event type: Error: 21-08-2012 23:21:53] WinSCPSession.GetDirectoryInfo: Element "files" not found in the log file
at WinSCP.CustomLogReader.WaitForNonEmptyElement(String localName, LogReadFlags flags)
at WinSCP.CustomLogReader.WaitForNonEmptyElementAndCreateLogReader(String localName, LogReadFlags flags)
at WinSCP.Session.ListDirectory(String path)
at I2ABS.WinSCP.WinSCPSession.GetDirectoryInfo(Object threadItem) in C:\Users\Marcel\documents\visual studio 2010\Projects\BackupTool\WinSCP\WinSCPSession.cs:line 250