Answers

Jul 27, 2007 - 08:46 AM
http://www.dotnet247.com/247reference...
I guess you could also ping a website
http://www.codeproject.com/dotnet/CSh...

Jul 28, 2007 - 03:21 AM
I decided to use the ping approach like this:
public bool CheckHostReachable(string host)
{
System.Net.NetworkInformation.Ping p = new Ping();
PingReply pingReply = p.Send(host, 5000);
return (pingReply.Status == IPStatus.Success);
}
I found out that there is also an asynchronous way of pinging, but since I needed the next action to be dependent on whether I had connectivity or not, I decided to use the synchronous way.

Jul 28, 2007 - 07:21 AM

Dec 28, 2010 - 07:50 PM
Add New Comment