My test software uses an internal web service to obtain product information for testing purposes. If this web service fails to respond I want to check if the network is available. At the moment several of our test systems don't have access to the CLI for security purposes so I can`t use the PING command and `System Exec.vi`. My next idea is to use the .NET Ping function which seems to work (although it seems to have a few pitfalls)
Can I have your thoughts on how to check the network status? Do you have a simple preferred method ?
Thanks in advance,
Can you not access the database that is driving the webservice (thinking outside the box here)?
I've always used the System Exec command method.
Unfortunately I`ve not been given permission by IT, partly because its an old system which they are in the process of upgrading,
hence the webservice.
I guess I could keep running the `Open Web Service` vi and wait for that to repond( as a network check), I just feel more comfortable with a Ping command.
Yep I've used ping for the same thing pretty much and it just feels as if you're doing things properly.
In truth banging the Open Web Service.vi is probably just as effective!
Is there a simple web page on that server that you can check for? Then you can see if the network is there, or manually do a Ping, but with a twist. Try sending a request to port 13 as this is the Simple Network Time Protocol port and should respond with the date/time. Mike
Not sure if this helps in your case but to monitor networks adapters on a windows system I have used a modified version of Get Network Card Information https://decibel.ni.com/content/docs/DOC-1267 which uses win 32 kernel32 and IP Helper API Iphlpapi.dll.
Bit of a hacky way if you wanted something quick. Is this an internet connection as well?
If so put www.google.co.uk or similar into the string to IP function. Technically this checks whether there is DNS (rather than just network) but if it returns a number everythings looking good.