How to check if the internet connection has been lost WP7

advertisements

How can I check if internet connection was lost in WP7.I'm developing social app and if internet connection was lost I have FileNotFoundException.I can't use try/catch because its doesn't prevent my app from closing with exception.Also if (NetworkInterface.GetIsNetworkAvailable()) works only from time to time and not always shows the truth.


The only reliable way I have found is to ping something reliable. My customer set up a "ping" call on the server that I need to access, which is the ultimate test. If I can reach that call, I can (or shoule be able to) reach any of them.