upload extremely slow
I'm using winscp dll 5.5.6 and i find it extremely slow.
This statement takes over a minute to upload a small 3kb file.
can you point to the issue please ?
here is my full code :
This statement takes over a minute to upload a small 3kb file.
FTPsession.PutFiles(Localpath, Remotepath, False, _transferoptions)
can you point to the issue please ?
here is my full code :
Private Function Upload() As Boolean _Sessionoptions = New SessionOptions Try With _Sessionoptions .HostName = hostname .PortNumber = 21 .UserName = login .Password = passwd .Protocol = Protocol.Ftp End With Catch ex As SessionException MsgBox(ex.Message, MsgBoxStyle.Critical) Catch ex As Exception MsgBox(ex.Message, MsgBoxStyle.Critical) End Try With _transferoptions .TransferMode = TransferMode.Automatic .PreserveTimestamp = False End With 'open the session and transfer file Dim FTPsession As Session Try FTPsession = New Session 'continuous progress reporting AddHandler FTPsession.FileTransferred, AddressOf FileTransferred 'Connect Dim filepath As String = System.Reflection.Assembly.GetExecutingAssembly.Location ' Session.ExecutablePath = FTPsession.DisableVersionCheck = True FTPsession.Open(_Sessionoptions) _transferresult = FTPsession.PutFiles(Localpath, Remotepath, False, _transferoptions) _Sessionoptions = Nothing If _transferresult.IsSuccess = True Then Return True Else Errorlog = "Error in WinSCP " Return False End If Catch ex As Exception Errorlog = "Error in WinSCP : " & ex.Message.ToString MsgBox(Errorlog) Return False Finally FTPsession.Dispose() FTPsession = Nothing End Try End Function