Problem using WeOnlyDo.Client.FtpDLX, Timeout occu (wodSFTP / wodSFTP.NET / wodSFTPdll)
I have the next code:
[code]
'[...]
for each sFile as String in arrayFiles
try
Dim objFTP As New WeOnlyDo.Client.FtpDLX
objFTP.Blocking = 1
objFTP.LicenseKey = linceskey
objFTP.Hostname = url
objFTP.Login = user
objFTP.Password = password
objFTP.Connect()
objFTP.PutFile(sFile, serverFolder)
objFTP.Disconnect(True)
catch ex As Exception
ex.Message.ToString()
End Try
Next [/code]
the first 40, uploaded with success to server, but in the upload of follow 25 I have this error message:
ex.Message = Timeout occured due to inactivity
Saludos,
Re: Problem using WeOnlyDo.Client.FtpDLX, Timeout
Hi Sergio,
Can you please unload wodFtpDLX.NET reference before starting new one? To do that you should add this code just after Disconnect Method in your code:
[code]objFTP = Nothing[/code]
So your code should look something like this:
[code] For Each sFile As String In arrayFiles
Try
Dim objFTP As New WeOnlyDo.Client.FtpDLX
objFTP.Blocking = 1
objFTP.LicenseKey = linceskey
objFTP.Hostname = url
objFTP.Login = user
objFTP.Password = password
objFTP.Connect()
objFTP.PutFile(sFile, serverFolder)
objFTP.Disconnect(True)
objFTP = Nothing
Catch ex As Exception
ex.Message.ToString()
End Try
Next[/code]
Let us know how it goes.
Regards,
Drazen
Re: Problem using WeOnlyDo.Client.FtpDLX, Timeout
Thanks, I'm going to try this.
Saludos,