Problem with downloading with WebClient

powerzan

New member
Joined
Feb 2, 2012
Messages
2
Programming Experience
3-5
Hello! I have one problem. I am trying to download a file, that is 3,487Kb big. I have problem with progress and finishing file. The progress is not corret, and it download just 20Kb of 3,487Kb. That is my code:
VB.NET:
'Click on LinkLabel1 starts downloading
    Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LinkLabel1.LinkClicked
        Me.Text = "Prenašanje programa"
        Label1.Text = "Prenašam namestitveni program"
        LinkLabel1.Visible = False
        wc3.DownloadFileAsync(New Uri("https://1bmyjw.sn2.livefilestore.com/y1p1K7821OEhWc8gMcPfZnOeQDouKkTeA_tZqczJfGlJxxX4Y9wQXC5rMeVVuUKIkpxCVFildSJZ-8pD0MBrJ_Ovpfcmp_BIOEB/update.exe?psid=1e"), Path.GetTempPath + "\SF-Zacasne_datoteke\update.exe")
        ProgressBarX1.Visible = True
        Label2.Visible = True
    End Sub

'Code for progress
    Private Sub wc3_DownloadProgressChanged(ByVal sender As Object, ByVal e As System.Net.DownloadProgressChangedEventArgs) Handles wc3.DownloadProgressChanged
        ProgressBarX1.Value = e.ProgressPercentage
        Label2.Text = ProgressBarX1.Value.ToString + "%"
    End Sub

'Code what to happen, when download is finished
    Private Sub wc3_DownloadFileCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.AsyncCompletedEventArgs) Handles wc3.DownloadFileCompleted
        LinkLabel1.Visible = False
        LinkLabel2.Visible = True
        ProgressBarX1.Visible = False
        Label2.Visible = False
        Label1.Text = "Program je prenešen - naj zaženem namestitev?"
    End Sub
Thanks for all your help!
 
I would guess you only get a login page returned.
 
Back
Top