|
-
Jan 28th, 2007, 04:02 PM
#1
Thread Starter
Lively Member
[RESOLVED] [2005] Check for internet connection?
Hello!
When my application loads, it pings a website, and downloads an .xml file to check for a newer version of the program. However, i quickly found out, this resulted in an error if either a firewall is blocking this, or if the internet connection is disconnected. So, i put in some "if"'s and "else"'s. This partially solved the problem.
But on computers with no internet connection at all (as in not disconnected connections, but with no connections), an unhandled exception is thrown when the ping is run as there are no connections present. So is there a way to fix this, so that if there are no connections available, it just skips the whole thing?
Some code
VB Code:
If My.Computer.Network.Ping("http://connect-utb.byethost8.com", 1000) Then My.Computer.Network.DownloadFile(remotefile, localfile)
Else
End if
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|