WinSCP TimeOut
I have written a script to use in SSIS that will transfer files from a folder to an SFTP site.
The script is pretty straight forward, it simply reads the contents of a folder and transfers each file it sees and then archives or deletes the file
after it is transferred.
All seems to work ok but on any file greater than 30 meg I get a timeout after 1 minute:
IE:
INFORMATION 05/06/2016 07:15:26 AM Sub Upload_Files - Uploading File [filename].zip, FileSize = 85.13 MB
CRITICAL 05/06/2016 07:16:26 AM An Error Occurred Transferring File [filename].ZIP, The Error Was Timeout waiting for WinSCP to respond
I have tried setting a timeout value.
Dim Timer As New TimeSpan(2, 0, 0) 'https://winscp.net/forum/viewtopic.php?t=14199
'
Dim mySessionOptions As New SessionOptions
'
With mySessionOptions
.Protocol = Protocol.Sftp
.HostName = CType(Dts.Variables("sFTPSite").Value, String)
.UserName = CType(Dts.Variables("sFTPUserName").Value, String)
.Password = CType(Dts.Variables("sFTPPassWord").Value, String)
.Timeout = Timer
.TimeoutInMilliseconds = 300000
.GiveUpSecurityAndAcceptAnySshHostKey = True
End With
mySession.Open(mySessionOptions)
Nothing seems to help.
Does anyone have any suggestions?
The script is pretty straight forward, it simply reads the contents of a folder and transfers each file it sees and then archives or deletes the file
after it is transferred.
All seems to work ok but on any file greater than 30 meg I get a timeout after 1 minute:
IE:
INFORMATION 05/06/2016 07:15:26 AM Sub Upload_Files - Uploading File [filename].zip, FileSize = 85.13 MB
CRITICAL 05/06/2016 07:16:26 AM An Error Occurred Transferring File [filename].ZIP, The Error Was Timeout waiting for WinSCP to respond
I have tried setting a timeout value.
Dim Timer As New TimeSpan(2, 0, 0) 'https://winscp.net/forum/viewtopic.php?t=14199
'
Dim mySessionOptions As New SessionOptions
'
With mySessionOptions
.Protocol = Protocol.Sftp
.HostName = CType(Dts.Variables("sFTPSite").Value, String)
.UserName = CType(Dts.Variables("sFTPUserName").Value, String)
.Password = CType(Dts.Variables("sFTPPassWord").Value, String)
.Timeout = Timer
.TimeoutInMilliseconds = 300000
.GiveUpSecurityAndAcceptAnySshHostKey = True
End With
mySession.Open(mySessionOptions)
Nothing seems to help.
Does anyone have any suggestions?