Hi! I wanna download 2 GB file with WebClient, but after it downloads 1 GB it stops without any error.
Thanks for any help!
Code:
Sub download(ByVal file As String, ByVal uri As String, ByVal ffile As String)
la_dl.Text = file
SW = Stopwatch.StartNew
Dim client As WebClient = New WebClient
AddHandler client.DownloadProgressChanged, AddressOf download_change
AddHandler client.DownloadFileCompleted, AddressOf client_DownloadCompleted
If My.Computer.FileSystem.DirectoryExists(Application.StartupPath & "/dl") = False Then
My.Computer.FileSystem.CreateDirectory(Application.StartupPath & "/dl")
End If
client.DownloadFileAsync(New Uri(uri), Application.StartupPath & "/dl/" & ffile)
End Sub