Topic "upload extremely slow"

Author Message
[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.

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
            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

            FTPsession = New Session

            'continuous progress reporting
            AddHandler FTPsession.FileTransferred, AddressOf FileTransferred
            Dim filepath As String = System.Reflection.Assembly.GetExecutingAssembly.Location
            ' Session.ExecutablePath =
            FTPsession.DisableVersionCheck = True
            _transferresult = FTPsession.PutFiles(Localpath, Remotepath, False, _transferoptions)
            _Sessionoptions = Nothing

            If _transferresult.IsSuccess = True Then
                Return True
                Errorlog = "Error in WinSCP "
                Return False
            End If

        Catch ex As Exception

            Errorlog = "Error in WinSCP : " & ex.Message.ToString
            Return False
            FTPsession = Nothing
        End Try

    End Function
[View user's profile]

Joined: 2015-01-13
Posts: 2
i ended up using wininet.dll, it was faster.
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26299
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

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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License