![]() |
|
File Downloader isn't working? - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: Visual Basic & .NET Framework (https://sinister.li/Forum-Visual-Basic-NET-Framework) +--- Thread: File Downloader isn't working? (/Thread-File-Downloader-isn-t-working) Pages:
1
2
|
File Downloader isn't working? - unnamed - 08-14-2013 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 ClassError Spoiler:
3rd post RE: File Downloader isn't working? - The Real Slim Shady - 08-14-2013 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? - unnamed - 08-14-2013 (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. ![]() EDIT#2: File download works, file execute gives error. RE: File Downloader isn't working? - invisal - 08-14-2013 Quote:EDIT#2: File download works, file execute gives error. Can you execute the downloaded file manually? RE: File Downloader isn't working? - unnamed - 08-14-2013 (08-14-2013, 01:49 PM)invisal Wrote:Quote:EDIT#2: File download works, file execute gives error. 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? - invisal - 08-14-2013 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? - unnamed - 08-14-2013 (08-14-2013, 02:10 PM)invisal Wrote: There are a lot of possibilities: Hmm, do you think there are others way to achieve the same result. Anyway, thanks for your help. RE: File Downloader isn't working? - invisal - 08-14-2013 Quote:Hmm, do you think there are others way to achieve the same result. 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? - unnamed - 08-14-2013 Wow it was me uploading to ge.tt that created the error. Shitty web ![]() I'm just going to use another uploading website. RE: File Downloader isn't working? - invisal - 08-14-2013 Why don't you setup a local web server to test? Then, have your program download http://127.0.0.1/download/filename.exe |