I am working on a offline mode for a project in C#
.
A user connected to his enterprise network via vpn
client at home. If internet connectivity has gone and immediately the next one minute, the particular vpn
client try to reconnect. In this situation the below method GetIsNetworkAvailable()
gives the internet connectivity state as True
. But logically i am not connected to Internet.
Is there any way get the correct internet connectivity state when my vpn client try to reconnect.
bool isConnected = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable();