View Full Version : Anybody have luck with Network.Doanload() ?


Surjer
03-02-2006, 12:41 PM
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
03-02-2006, 03:38 PM
make sure you pass user and password along with it.

Surjer
03-03-2006, 09:46 AM
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
03-03-2006, 03:52 PM
try including the file name in the address of the URI

Surjer
03-06-2006, 07:42 AM
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