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