VBA --- Timeout waiting for WinSCP to respond
I've implemented WinSCP .NET Assembly for VBA, trying to upload files from a local folder through SFTP, but I'm getting "Timeout waiting for WinSCP to respond" when I try to upload a number of files bigger than 150 - 200.
Of course, I've tried using .TimeoutInMilliseconds and I've increased it and tested even with 900000.
If I transfer only 100 files, it's ok with values much much lower than 900000. BTW, what is the MAX value for TimeoutInMilliseconds?
When I get the timeout error, it fails without transferring any file, so this makes me understand that it fails at the part when WinSCP evaluates the number of files & dimension it has to transfer, before starting the transfer.
The files are .zip and have in average 110 KB, so the transferred values are not so big, between 20MB-45MB per day.
.Protocol = Protocol_Sftp
.TimeoutInMilliseconds = 600000
.HostName = "xx.xxx.xxx.xx"
.UserName = "xxxxx"
.GiveUpSecurityAndAcceptAnySshHostKey = True
.SshPrivateKeyPath = "C:/xxxx/PrivateKey.ppk"
And the transfer is done like:
' Upload files
Dim myTransferOptions As New TransferOptions
myTransferOptions.TransferMode = TransferMode_Binary
Dim transferResult As TransferOperationResult
Set transferResult = mySession.PutFiles("\\local\path\*", "/in/", False, myTransferOptions)
Thanks in advance for your advices.