Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Winscp assembly getting timeout

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

Re: Winscp assembly getting timeout

the .net winscp exe is trigger using windows task scheduler.
martin

Re: Winscp assembly getting timeout

OK, but how are you running it?
Guest

Re: Winscp assembly getting timeout

Hi Martin,
am running on window server 2012 server 64bit on all environments.
martin

Re: Winscp assembly getting timeout

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

Winscp assembly getting timeout

sorry uploaded the wrong timeout output file.
kolotan

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

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

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