Topic "upload extremely slow"

Author Message
gottfried91513
[View user's profile]

Joined: 2015-01-13
Posts: 2
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.

Code:
FTPsession.PutFiles(Localpath, Remotepath, False, _transferoptions)


can you point to the issue please ?

here is my full code :
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
gottfried91513
[View user's profile]

Joined: 2015-01-13
Posts: 2
i ended up using wininet.dll, it was faster.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate log file, set Session.SessionLogPath. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License