Hi im fairly new to developing (started making some basic small programs yesterday) and today I was working on a program which is essentially a updater/update checker and what the program does is it checks the version of the checker and compares it to the current version.txt and if they arent the same it downloads the update from the link within the code. but when I try debugging the program there are no error's going into the debugging and there are none when I check for any updates, but I purposely made a update to check if the download feature works, and when I try to download the latest version of the application I get this error: A first chance exception of type 'System.Net.WebException' occurred in System.dll

The file im downloading is a direct download and it is a .exe file aswell

My.Computer.Network.DownloadFile("http://dl.dropbox.com/u/30513598/Updates/Updates/Server%20Update%201.0.0.1.exe", "C:\downloadedfile.exe")
            Process.Start("C:\downloadedfile.exe")

Im not sure whats wrong with it, if you can tell me whats wrong with it please do I really want to make my first substantial program.

hm... not sure what the problem is but maybe this might help

Dim Temp as string = "C:\DownloadFile.Download"
Dim SavePath as string = "C:\DownloadFile.exe"
Dim Url as string = "http://dl.dropbox.com/u/30513598/Updates/Updates/Server%20Update%201.0.0.1.exe"
Dim Browser as new System.net.Webclient

Browser.DownloadFile(Url, Temp)
If System.File.exists(SavePath) then
System.file.delete(SavePath)
end If
System.file.move(Temp, SavePath)

Edited 5 Years Ago by Huntondoom: n/a

This article has been dead for over six months. Start a new discussion instead.