I have the following method:
public static bool IsNetworkConnected()
{
ConnectionProfile InternetConnectionProfile = NetworkInformation.GetInternetConnectionProfile();
IReadOnlyList<ConnectionProfile> connectionProfile = NetworkInformation.GetConnectionProfiles();
if (InternetConnectionProfile == null)
return false;
else
return true;
}
It works fine when I'm connected to the internet in a typical way - via LAN cable or Wi-Fi. When I'm using my 3G USB modem it returns false (InternectConnectionProfile
is null). Why is that? How can I fix it?
Try
This might help you http://social.msdn.microsoft.com/Forums/en-US/winappswithhtml5/thread/a7ba014c-3a31-4ff3-ba10-0c835305828b/
You may consider pinging a server on the internet. This is not the 100% answer to your question but may be helpful from a different point of view.