SessionOptions.Timeout set to 120 seconds but connection times out in about 20 seconds
I am using winscp.exe and WinSCPnet.dll 6.3.5.0 and .NET framework 4.6.1.
I set the session option timeout to 120 seconds; however,when calling
I set the session option timeout to 120 seconds; however,when calling
Session.Open
, the session times out after 15–20 seconds. how can I increase the timeout in seconds to the value I've configured?
var sessionOptions = new SessionOptions(); sessionOptions.Protocol = Protocol.Sftp; sessionOptions.HostName = processArguments.FtpServerName; sessionOptions.UserName = processArguments.FtpUserName; sessionOptions.Password = processArguments.FtpPassword; sessionOptions.Timeout = TimeSpan.FromSeconds(120); using (Session session = new Session()) { session.ExecutablePath = executablePath; session.Open(sessionOptions); }