locked
I need a better way to determine if the user doesn't have internet connection RRS feed

  • Question

  • Hi,
    I need to determine when the user doesn't have internet connection. And I have tried many different ways doing it.

    The problem is that sometimes the computer says I have internet connection even when I don’t, so I have to restart the router and so on…

    But I need my application to always know if the user is offline or not.

    Do you have any idea what the best way to determine when the user is offline might be?

    • Edited by Colombium Wednesday, October 23, 2013 6:05 PM
    Wednesday, October 23, 2013 6:05 PM

Answers

  • What is the scenario you're trying to achieve?

    The only way to tell for sure if your app can reach the services it needs is to try to reach them and then handle the failure if it can't.

    --Rob

    Wednesday, October 23, 2013 6:27 PM
    Moderator
  • You could also try the Windows.Networking.Connectivity namespace and this method.
    • Marked as answer by Colombium Thursday, October 24, 2013 8:47 PM
    Thursday, October 24, 2013 6:19 AM

All replies

  • What is the scenario you're trying to achieve?

    The only way to tell for sure if your app can reach the services it needs is to try to reach them and then handle the failure if it can't.

    --Rob

    Wednesday, October 23, 2013 6:27 PM
    Moderator
  • You could also try the Windows.Networking.Connectivity namespace and this method.
    • Marked as answer by Colombium Thursday, October 24, 2013 8:47 PM
    Thursday, October 24, 2013 6:19 AM

  • Thanks for directing me to the right site, it seems to work now!
    Thursday, October 24, 2013 8:47 PM