Check Network Connection Before Login

If a device does not establish a network connection, the login process does not return a result until after a long timeout occurs. To avoid this delay, check the network connection before performing a login.

Search for Detect and Verify a Network Connection on the .NET Framework Developer Center at http://msdn.microsoft.com/en-us/netframework for information on verifying connections to network resources required by an application.