Anybody have luck with Network.Doanload() ? (1 Viewer)

Surjer

Registered User.
Local time
Today, 15:42
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
 

Kodo

"The Shoe"
Local time
Today, 11:42
Joined
Jan 20, 2004
Messages
707
make sure you pass user and password along with it.
 

Surjer

Registered User.
Local time
Today, 15:42
Joined
Sep 17, 2001
Messages
232
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
 

Kodo

"The Shoe"
Local time
Today, 11:42
Joined
Jan 20, 2004
Messages
707
try including the file name in the address of the URI
 

Surjer

Registered User.
Local time
Today, 15:42
Joined
Sep 17, 2001
Messages
232
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

Top Bottom