Example of Timeout Value Change

Advertisement

spencet15
Joined:
Posts:
1
Location:
CT

Example of Timeout Value Change

I'm trying to override the default timeout value in my SessionOptions code but unable to determine the correct syntax of the timeout setting.

'// setup FTP session options
Dim mySessionOptions As New SessionOptions
With mySessionOptions
.Protocol = Protocol.Sftp
.HostName = FTP.FtpHostName
.UserName = FTP.FtpUserName
.Password = FTP.FtpUserPassword
.GiveUpSecurityAndAcceptAnySshHostKey = True
.Timeout(30)
End With


I've also tried .Timeout = 30 to no avail.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

Re: Example of Timeout Value Change

What language is that? VB.NET, VB, VBA?

With old VB/VBA, you cannot use SessionOptions.Timeout. You have to use SessionOptions.TimeoutInMilliseconds. This is available in 5.5.4 and later only.
See https://winscp.net/tracker/show_bug.cgi?id=1156
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum