using System ; using System.Runtime ; using System.Runtime.InteropServices ; public class InternetCS { [DllImport("wininet.dll")] private extern static bool InternetGetConnectedState( out int Description, int ReservedValue ) ; public static bool IsConnectedToInternet( ) { int Desc ; return InternetGetConnectedState( out Desc, 0 ); } }If you don't want to use "old" DLLs and stay with managed code you could us the new Ping class introduced in 2.0. You could try to ping a server that is "always" up (like cnn.com or levelextreme.com). I looked briefly at the Ping examples in the M$ docs and the examples look good.