OAuth2 and LabVIEW — Revisited for 2020, Changes to the LabVIEW Web Servers
One of the significant (and essentially undocumented) new changes in LabVIEW 2020 was changing the default web server from the old LabVIEW Web Server to the new NI Web Server. Unlike the LabVIEW Web Server, which runs as part of a LabVIEW instance, the NI Web Server is a separate application dedicated to just being a web server.
For the most part, you can use it just as before. There’s still a “Start” menu which you find by right clicking on the web service in the LabVIEW Project.
If you select this, the only change you’ll likely notice is that it’s running on a different port, shown below.
In LabVIEW 2019, this defaults to the debug server, which you may remember from part one of this series, runs on port 8001. To continue using the new web server, I’ll need to change my callback URI:
Note that the NI Web Server is not exactly the same as the LabVIEW Web Server, so I suppose you might run into some sort of incompatibility with this change. But the NI Web Server has more features and can be made more secure, so I’d try and use it, if you can.
If you really want the old web server, you can select it from the Application Web Server menu, shown below.
Question for the experts: in the “Debug Web Service Launched” dialog box shown above, it says that it’s launching a debug web server on port 80. Does anybody know if that’s correct? If so, is there any difference between the port 80 debug server (running in httpd.exe) and the port 8001 debug server (running in LabVIEW.exe)?
As long as we’re here, the “Publish” menu item is for publishing to yet another web server, the Application Web Service. This lets you persist the web service without needing to start it from LabVIEW.
Confused by all the NI web servers? You betcha! Fortunately, here’s an NI knowledgebase document that tries to sort some of it out. In part five of this series, I’m going to show how to make OAuth2 work without using any of these web servers. Stay tuned.
The other articles in this series:
- Part One — Setting up a LabVIEW Web Service Callback Function
- Part Two — The Authentication Process
- Part Three — Improving the Example
- Part Four — Reusability
- OAuth2 and LabVIEW 2020, Using the New SHA256 VI
- OAuth2 and LabVIEW 2020, A Bug in the SHA256 VI
- OAuth2 and LabVIEW — A Bug in LabVIEW’s SSL Certificate Handling
- OAuth2 and LabVIEW 2020, Changes to the LabVIEW Web Servers
- OAuth2 and LabVIEW — Replacing the Web Server