Skip to content

OAuth2 and LabVIEW — Revisited for 2020, Changes to the LabVIEW Web Servers

Enough about LabVIEW bugs (part 2, part 3)–let’s talk about LabVIEW 2020 features!

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.

Start menu for starting the web service.

If you select this, the only change you’ll likely notice is that it’s running on a different port, shown below.

Debug web service dialog in 2020

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:

Redirect URI that needs to change for port 80

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:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.