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:
  1. If My.Computer.Network.Ping("http://connect-utb.byethost8.com", 1000) Then                  My.Computer.Network.DownloadFile(remotefile, localfile)  
  2. Else
  3. End if