Downloading a file

Posts 15 of 5 · Page 1 of 1
Downloading a file
Hey guys im making a file downloader for some random shit, and everytime i test it to download i get this error: The remote server returned an error: (403) Forbidden.

Any way i can fix that?
Here's my code:

Code:
Imports System.IO
Public Class Form1
    Private _path As Object
    Private Sub AeroButtonA1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AeroButtonA1.Click
        _path = TextBox1.Text
        If RadioButton1.Checked = True Then
            Install2()
        End If


        If RadioButton2.Checked = True Then
            Install()
        End If
    End Sub
    Public Sub perx()
        Label8.Text = "Downloading PerX.zip..."
        Cursor = Cursors.WaitCursor
        My.Computer.Network.DownloadFile("https://dl-web.*******.com/get/PerX.zip?w=f01debe1&dl=1", "" + _path + "\PerX.zip")


    End Sub



    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        My.Computer.Audio.Play(My.Resources.gamestartup01, AudioPlayMode.BackgroundLoop)
    End Sub

    Private Sub TabPage2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TabPage2.Click

    End Sub
    Public Sub Install()
        perx()
        Cursor = Cursors.Default
        MsgBox("Finished downloading PerX.zip!", MsgBoxStyle.Information, "Download Finished")
        Label8.Text = "Idle"
    End Sub
    Public Sub Install2()
        hack()
        Cursor = Cursors.Default
        MsgBox("Finished downloading CABase.rar!", MsgBoxStyle.Information, "Download Finished")
        Label8.Text = "Idle"
    End Sub
    Public Sub hack()
        Label8.Text = "Downloading CABase.rar..."
        Cursor = Cursors.WaitCursor
        My.Computer.Network.DownloadFile("https://dl-web.*******.com/get/CABASE.rar?w=15eeb2d7", "" + _path + "\CABase.rar")
    End Sub

    Private Sub AeroButtonA2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AeroButtonA2.Click
        Dim FolderBrowserDialog1 As New FolderBrowserDialog
        FolderBrowserDialog1****otFolder = Environment.SpecialFolder.Desktop
        FolderBrowserDialog1.SelectedPath = "C:\"
        FolderBrowserDialog1.Description = "Select your save directory."
        If FolderBrowserDialog1.ShowDialog = DialogResult.OK Then
            TextBox1.Text = FolderBrowserDialog1.SelectedPath
            AeroButtonA1.Enabled = True
        End If
    End Sub
End Class
It's something to do with the server/website you're downloading from, it's rejecting the request. You sure the link is even valid?
yes im sure, iv tested it alot

and i uploaded the files today
Try using this to download the file:
[highlight=vb.net]Dim wc As New WebClient
wc.DownloadFile("blah, link here", "destination")
wc.Dispose()
[/highlight]
ok ill try that and let ya know it if works
Posts 15 of 5 · Page 1 of 1

Post a Reply

Tags for this Thread

None

Need help?