LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Publicly accessible web services

Recently I developed a web application in LabVIEW NXG and web services in LabVIEW 2019. In the web application I called my web services using this rubric: 

 

http://###.###.###.###:8002/Webservice_Name/Test_Webservice

 

In my web service vi's I set up Access-Control-Allow-Origin to * so that there wouldn't be any problems with web service calls being rejected. During testing the web application and web services were able to talk to each other without any problems. 

 

Then I attempted to make my web application publicly accessible. In "Internet Information Systems" on my windows based physical web server I bound our purchased web domain to the physical web server on port 80 and was able to see my web application from any computer without any issues. The web services however were not as fortunate. A F12 examination of the web application showed that the web service calls were coming from the client side (aka the computer outside the network) and not the physical web server like I'd expected.  

 

I've had moderate success publishing my webservices to the Application Web Server and the NI Web Server using the development environment of LabVIEW in that after publishing to them I was able to locally access my webservices by typing their http address into a browser; however, where I'm running into problems is making them "publicly accessible" and creating an installer that I can use on the physical web server. The "publicly accessible" part I think is just a matter of swapping the ip address for the domain name in the web service calls, setting up my hostname as my purchased domain name and defining the port in both the Application and NI Web Server environments, but it seems my most pertinent problem stems from an inability to correctly create an installer.

 

I created two versions of my code. A LabVIEW 2019 version where I publish to the Application Web Server and a LabVIEW 2020 version where I publish to the NI Web Server. In both cases I created an installer and ran them on the physical webserver, yet when I go to look at the Application Web Server and NI Web Server configurations on the physical web server they do not reflect the changes I'd made in the development version of either piece of code on my pc. 

 

My question is when I create an installer to distribute a web service should I expect the Application or NI Webserver configurations on that machine to change or does the application when run spin up an entirely different webserver instance with the configurations I'd set in the development environment. If the former, are there additional installers beyond the ones listed below that I should be including?

 

NI LabVIEW Runtime 2020SP1

NI System Web Server 2020 SP1

NI Web Server Deployment Support for LabVIEW 2020 32-bit

*I did find another solution that suggested manually selecting "NI web configuration and monitoring" but that doesn't show up in my list of additional installers.*

 

If the latter, how can I tell if its running or change its configurations? 

Any help would be appreciated.

Chris Shelton
Certified LabVIEW Developer
Automation Systems Engineer
0 Kudos
Message 1 of 1
(1,147 Views)