Two come to mind
Dim webRequestor As HttpWebRequest
Dim webResponder As HttpWebResponse
Dim url As String = ConfigurationSettings.AppSettings.Item("url").ToSt ring
Try
webRequestor = CType(WebRequest.Create(url), System.Net.HttpWebRequest)
webResponder = CType(webRequestor.GetResponse, System.Net.HttpWebResponse)
If webResponder.StatusCode = HttpStatusCode.OK Then
Return True
Or using the winAPI
Make sure you include Runtime.InteropServices;
[DllImport("wininet.dll")]
private extern static bool InternetGetConnectedState( int out Description,
int ReservedValue ) ;
//Creating a function that uses the API function...
public static bool IsConnected( )
{
int Desc ;
return InternetGetConnectedState( out Desc, 0 ) ;
}
"RS" <rl*****@worldnet.att.net> wrote in message
news:Oy**************@TK2MSFTNGP11.phx.gbl...
Is there a function that will tell you if your computer is
online to the internet ?