Basically you can adpot solution 1. But why to wait for 10 mins ? you can use the ping command to check wether the provided domain is a valid one or not.
for this you might need 2 things,
1. Internet Connection (to ping).
2. A small function which will return, wehther you got a response or not.
public static bool IsConnectedToInternet
{
get
{
Uri url = new Uri("www.testing.com");
string pingurl = string.Format("{0}", url.Host);
string host = pingurl;
bool result = false;
Ping p = new Ping();
try
{
PingReply reply = p.Send(host, 3000);
if (reply.Status == IPStatus.Success)
return true;
}
catch { }
return result;
}
}
The PING sends an ICMP (Internet Control Message Protocol) echo request to the server and waits to receive the echo back. If the value of Status is success, the PingReply is successful.