05-30-2017 11:08 AM
I'm looking for a way to programatically obtain the port used by the web server running a webservice, from within that webservice itself.
For instance if I have a webservice "DoStuff", and I'm running it in debug on port 8001, I want to be able to determine from withing "DoStuff" that the port in use is 8001. Is this possible?
06-03-2017 03:43 PM
Hi there,
I believe this may be somewhat what you are looking for:
http://digital.ni.com/public.nsf/allkb/6816DE13DCE0601986256C02007DEAA5
The application reference has a property -> Web Server -> HTTP Port where you can read the LabVIEW Web Services port configuration for that particular machine.
Hope this helps,
Ed
06-05-2017 07:13 AM
Hello, additionally you could review the following links:
and
http://forums.ni.com/t5/LabVIEW/Application-Web-Server-How-to-Change-Port/td-p/3133246
These forum topics are not exactly what you need, however they work with similar functions. Look out for the Property Node and WebSrvr.Port under Application Class.
06-06-2017 09:40 AM
Do you know if this only works in a published web service? I tried this on the debug server and it only returns 0 as the port.
06-06-2017 09:40 AM
Do you know if this only works in a published web service? I tried this on the debug server and it only returns 0 as the port.