How to determine if my WPF client application is disabled?

In WPF (in the code behind) is there a way to determine if the computer on which the client application is running has access to the Internet?

I'm not sure if there is a simple dedicated method / property to check this out or whether I will need to try HttpGet or the like to determine this.

Is there a property or method for this purpose?

- Lee

+3
source share
2 answers

It depends on what you consider "Internet access."

Safest - add the "ping" service to the server to which you want to connect, and poll this service.

Trying to monitor the status of a network is much more difficult because it is difficult to know if it is a network of another type of network.

See this post too

+1

, .

- , .

0

All Articles