Check if the internet connection is active

When using HTTP Request automations in NAV you have to call the send method. But if the internet is not active this can result in an error.
A user on mibuso had this problem.

So a little function to check if the internet is active could be a real help.
Well here you go, a ready to use function:

And the function itself:

Please mind that some sites do not allow to be pinged. So a general website ping could be a solution (When I tested here, msn.com does not respond, google.com did respond).

 

One thought on “Check if the internet connection is active

  1. Pingback: Check if the internet connection is active | Pardaan.com

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.