Anybody have luck with Network.Doanload() ?

Surjer

Registered User.
Local time
Today, 06:35
Joined
Sep 17, 2001
Messages
232
If My.Computer.Network.IsAvailable Then
If My.Computer.Network.Ping("www.MySite.com") Then
Debug.WriteLine("Site Available")
My.Computer.Network.DownloadFile(ADDRESS, MyFileName)
End If
End If
 
make sure you pass user and password along with it.
 
there isnt a un/pw - its a public server...

here is the address I am trying...
"http://terraservice.net/download.ashx?t=1&s=10&x=3700&y=22089&z=16&w=2000&h=2000"


I get this error -
5 A first chance exception of type 'System.ArgumentException' occurred in mscorlib.dll
 
try including the file name in the address of the URI
 
Got it to work - I am such a flippn n00b.

I put this in the wrong place and "MyFileName" wasnt populated all the way yet. Its derived from quite a few variables in a loop and I put this function about 10 lines to early. UGGH - i really need to tidy my project up! lol

Kinda silly that you would get that error for an invalid filename.
5 A first chance exception of type 'System.ArgumentException' occurred in mscorlib.dll
 

Users who are viewing this thread

Back
Top Bottom