Winscp assembly getting timeout

Advertisement

kolotan
Joined:
Posts:
3

Winscp assembly getting timeout

Hi folks,

I had set these setting
sessionOptions.Timeout = new TimeSpan(0,2, 0);
if (session.Opened == false) {
session.Open(sessionOptions);
session.Timeout = new TimeSpan(0, 3, 0);
}

but still i am hit with this timeout error.
System.NullReferenceException: Object reference not set to an instance of an object. at WinSCP.Session.CheckForTimeout(String additional) at WinSCP.Session.Open(SessionOptions sessionOptions)


from the winscp log below, it seem to get this timeout error after 60sec.
[2019-10-01 15:30:27.261Z] [0001] Session.SessionOptionsToUrlAndSwitches leaving
[2019-10-01 15:30:27.261Z] [0001] Command: [open "sftp://Oxxxxxxxx@xxxxxxxx:xx" -hostkey="ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:x:xx:xx:xx:xx:xx:xx:xx" -privatekey="xxxxxxxxxxxxxxxxxx.ppk" -timeout=120]
[2019-10-01 15:30:27.261Z] [0001] ExeSessionProcess.ExecuteCommand entering
[2019-10-01 15:30:27.261Z] [0001] ExeSessionProcess.ExecuteCommand leaving
[2019-10-01 15:31:27.276Z] [0001] Timeout waiting for WinSCP to respond - asking for callstack
[2019-10-01 15:31:27.277Z] [0001] ExeSessionProcess.RequestCallstack entering
[2019-10-01 15:31:27.294Z] [0001] Exception: System.Threading.WaitHandleCannotBeOpenedException: No handle of the given name exists.
at System.Threading.EventWaitHandle.OpenExisting(String name, EventWaitHandleRights rights)
at WinSCP.ExeSessionProcess.RequestCallstack()
[2019-10-01 15:31:27.294Z] [0001] ExeSessionProcess.RequestCallstack leaving
[2019-10-01 15:31:27.295Z] [0001] Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at WinSCP.Session.CheckForTimeout(String additional)
at WinSCP.Session.Open(SessionOptions sessionOptions)
[2019-10-01 15:31:27.295Z] [0001] Session.Cleanup entering

Reply with quote

Advertisement

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

Re: Winscp assembly getting timeout

Session.Timeout has to be set before Session.Open. Though I do not think it would help anyway.

In what environment are you running your code? What version of WinSCP? Please attach a complete WinSCP .NET assembly debug log file.

Reply with quote

kolotan
Joined:
Posts:
3

Re: Winscp assembly getting timeout

Hi martin,

i am using
product version : 5.15.0
File version : 5.15.1.9407

attached is the winscp log output.
Thanks in advance.
Description: Winscp log output

Reply with quote

martin
Site Admin
martin avatar

Re: Winscp assembly getting timeout

Thanks. Though you did not answer "In what environment are you running your code?"

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: Winscp assembly getting timeout

Did you try to play with Windows Scheduler task settings? Particularly with the "Security Options".

Reply with quote

Advertisement

You can post new topics in this forum