03-17-2016 05:54 PM
Is it possible to enable and disable LabVIEW Web Services in my application at run-time? If for example, I build an application with the web services, I have cases where I would like to prevent any access via the web service.
I was unable to find any Web Services VIs that appear to do what I'm asking.
Solved! Go to Solution.
03-18-2016 03:24 PM - edited 03-18-2016 03:25 PM
Hi NathanDll,
You should be able to do this. Check out this KnowledgeBase article:
Can I Programatically Start and Stop the LabVIEW Web Server?
http://digital.ni.com/public.nsf/allkb/6816DE13DCE0601986256C02007DEAA5
Let me know if this is not what you are looking for!
03-21-2016 04:55 AM
The method that Nick mentions should work - but if you only want to disable certain web services or certain VIs/URIs - you could have the web service VIs return invalid/blank data depending on a condition in your application (e.g. a ISServerActive? shared/global variable). For example, you get have the VI return a different HTTP status code (using the Web Service VI) if you don't want to accept the request (e.g. 404 not found, 401 unauthorised, 403 forbidden etc.).
03-21-2016 09:12 AM
Thanks guys! I can't believe that I didn't find that article through my searches. I guess it might be because I was searching for "services" instead of "server".