Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average
Thread Closed 


File Downloader isn't working? filter_list
Author
Message
File Downloader isn't working? #1
Code:
Public Class Form1
    Dim appdatapath As String = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  My.Computer.Network.DownloadFile("http://ge.tt/download", appdatapath + "\filename.exe")
  Process.Start(appdatapath + "\filename.exe")
    End Sub
End Class

Error

Spoiler:
3rd post


RE: File Downloader isn't working? #2
Did you read the error? ive never done any .NET coding but it looks to me like it cant overwrite the file that already exists. Maybe you should add some code to see if file exists prior to saving that file name/location?


RE: File Downloader isn't working? #3
(08-14-2013, 12:23 PM)Geoff Wrote: Did you read the error? ive never done any .NET coding but it looks to me like it cant overwrite the file that already exists. Maybe you should add some code to see if file exists prior to saving that file name/location?

Oh my bad I provided a wrong error.
Sec I'm uploading a new picture.

[Image: Gjy0f4o.png]


EDIT#2: File download works, file execute gives error.


RE: File Downloader isn't working? #4
Quote:EDIT#2: File download works, file execute gives error.

Can you execute the downloaded file manually?


RE: File Downloader isn't working? #5
(08-14-2013, 01:49 PM)invisal Wrote:
Quote:EDIT#2: File download works, file execute gives error.

Can you execute the downloaded file manually?

Oh wow I can't.

To sum it up.

>File works before uploading
>I started the program
>File gets downloaded
>Gives error
>Manual execution gives error too.


RE: File Downloader isn't working? #6
There are a lot of possibilities:
- The file is corrupted at the server side
- The file is corrupted because of downloading
- The file needs framework or runtime to run
- The file needs other dependent file (.dll, config file, etc...)
. And more...


RE: File Downloader isn't working? #7
(08-14-2013, 02:10 PM)invisal Wrote: There are a lot of possibilities:
- The file is corrupted at the server side
- The file is corrupted because of downloading
- The file needs framework or runtime to run
- The file needs other dependent file (.dll, config file, etc...)
. And more...

Hmm, do you think there are others way to achieve the same result.
Anyway, thanks for your help.


RE: File Downloader isn't working? #8
Quote:Hmm, do you think there are others way to achieve the same result.
Anyway, thanks for your help.

First thing first, we need to find a cause. Can you compare the filesize of your uploaded
file and with your downloaded file? I just checked "http://ge.tt". It is some kind of file hosting
site. I doubt the link you are trying to download is a direct download link.


RE: File Downloader isn't working? #9
Wow it was me uploading to ge.tt that created the error.
Shitty web Biggrin

I'm just going to use another uploading website.


RE: File Downloader isn't working? #10
Why don't you setup a local web server to test? Then, have your program
download http://127.0.0.1/download/filename.exe








Users browsing this thread: 1 Guest(s)