I know there is solution something like this:
public static bool HasConnection()
{
try
{
using (var client = new WebClient())
using (var stream = new WebClient().OpenRead("http://www.google.com"))
{
return true;
}
}
catch
{
return false;
}
}
But my question: is using google service a good practice for access checking?
I mean if an app has a lot of downloads this solution provide big amount of traffic for google. I think in this case google can block you app, can't it?
On the other hand I can use an own server, but I haven't a powerful enough one.
So what other solutions are exist?