LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI Web Server issues with HTTP Method VIs

We are having issues getting a simple web interface to work with the NI Web Server.  Essentially we want to enter a string into a webpage, receive that string into a LabVIEW application that will compare the string to a recipe, and then display a response on the webpage. We have two HTTP Method VIs, one for moving data from the web page to the LabVIEW code and one for the opposite direction.  We are using global variables in the block diagrams of the Method VIs and LabVIEW code as a simple way to link them together.  We have some javascript that interacts with the Method VIs and updates the web page.

 

Everything has worked fine during development if we right-click on the web service in the Project Explorer and go to the Application Web Server -> Start (Debug Server).  However, we run into lots of problems trying to run the NI Web Server by right-clicking on the web service and selecting "Start."  The Method VI that fills in the feedback text boxes only works once in a while.  All this VI is doing is copying global variables to terminals that get used as variables in our javascript.  I have a suspicion that the data on the webpage is getting overwritten but only with NI Web Server.  The Method VI looks like this:

jtrout_1-1661547030053.png

 

The output type of Method VI is set to Terminal.  It works fine running the debug Application Server when we only have the globals and the indicators wired to terminals.  However, it seemed to help running with the NI Web Server if we added the Web Service Request control, the read block, and the value indicator.  I don't understand what the Request control does.

 

On two other laptops, it just doesn't run at all (We get error messages like 67404, and we get other messages related to NI Package Manager if we try to deploy). 

 

We want to deploy the project on our client's computer and run the NI Web Server and associated executable application.  However, we are feeling uneasy, since we have had such inconsistent results in our office.  Can anyone explain how to make the web service more reliable or how we should change the design?

0 Kudos
Message 1 of 3
(740 Views)

We also have just noticed that the Method VIs don't work if we use the IP address in the URL instead of localhost.  This problem also is only when running with NI Web Server.

0 Kudos
Message 2 of 3
(738 Views)

BTW: I should have mentioned that we are using LabVIEW 2020 32 bit. 

Another update: we tried repairing the NI software but to no avail.  However, everything just started working after many attempts at building our application and package installer and deploying on various computers.  This week, at the customer site, we had everything working except for one logic error in our main VI.  After fixing this, we rebuilt the application and just replaced the .exe and associated files from the application build folder onto the target computer.  Now we have a new issue where the webpage is only being served when running the application from the Administrator user account and not when running from the regular user account on the PC.  Nothing else changed.  We just rebuilt the application after making a minor fix to the LabVIEW block diagram.  We rebuilt and replaced the files in the folder with the .exe.  Now there appear to be some new permissions issues.  Each step of the way, we haven't known good methods to debug the web service issues.  We just keep guessing and trying and hopefully make progress.  Any help with systematic methods for how other programmers are successfully deploying NI web services would be helpful.

0 Kudos
Message 3 of 3
(666 Views)