1

following code is extremely slow compared to filezilla (code uploads at about 100 kbps, filezilla at 28 Mbps)

    Private Sub UploadFTP(ByVal Datei As String, ByVal Dateiname As String, ByVal Ftp As String, ByVal Benutzername As String, ByVal Passwort As String)
    Try


    ' WebClient
    ftpUpload = New Net.WebClient

    ' URL mit Zieldatei
    Dim url As String = Ftp & IIf(Ftp.EndsWith("/"), "", "/") & Dateiname

    ' Anmeldedaten am FTP-Server
    ftpUpload.Credentials = New Net.NetworkCredential(Benutzername, Passwort)


    ' Datei asnychron uploaden
        ftpUpload.UploadFileAsync(New Uri(url), Datei)

    Catch ex As Exception

        TextBox1.Text = TextBox1.Text & ex.ToString & vbNewLine
    End Try
End Sub

after a few hours of googeling i was not able to find anything pointing me to the right direction. why is the upload so slow and how can i increase it?

EDIT

i think it is a buffer problem. but didnt find a way to increase the buffer.

thanks

4

0 回答 0