I am looking for the robust way to monitor the internet connectivity using C# application. I know that I can do it using periodically pinging some site but I want to do it robust way so that my application should able to detect the internet connectivity lost event in a moment.
The intension behing this to monitor the user has been connected to office or not using VPN or wireless connection. My application should be able to tell me immediately whenever I connect and discoonect from the office/internet. If this helps to you. When I connect to office, I will have another interface along with ISP provider IP with predefined IP address range say 124.45.xx.xx( though IP isnot a real one).
Any alternative suggestion would also be appreciated.