title: How to check if internet connectivity available or not in C#
body: <p>I have developed a software for a company. For some kind of licensing purpose i am using a remote database to allow/disallow usage of the software. This task is applied every time the user logs into the software. If the internet connection does not exist or the query to the remote database fails, the user gets an error and he can not log into the software and shows the remote database http address (which i dont want him to see, if he carefully read the error)</p>
  
  <p>What i want to know is any way of doing the same procedure, but if the remote database query fails or internet connection is not available, it should bypass the check for the time being, and upon next login try, same procedure is followed. So that my client should not know about this licensing stuff. </p>
  
  <p>How to check the internet connectivity (LAN, WiFi, Dialup or whatever the user is using) before creating a query to the remote database.</p>
  
  <p>Proposed methods:</p>
  
  <ol>
  <li><p>Ping my remote database server IP.</p></li>
  <li><p><a href="https://stackoverflow.com/questions/1085045/check-whether-internet-connection-is-available-with-c">This Question by Michel</a></p></li>
  </ol>
  
  <p>Regarding results what i achieved from Michel' question is no stable solution.</p>