To download NI software, including the products shown below, visit ni.com/downloads.
This example will walk you through hosting a web application securely on your own network using the NI Web Server. This is one of many ways you can host your web application. One other popular way is hosting your web application in SystemLink Cloud, an NI cloud hosting service for your web applications. It simplifies the process for hosting a web application and takes care of modern security precautions for you. If you’d like to learn more, visit this tutorial.
Hosting your web application is one piece of an overall web application architecture as pictured below.
The software used in this example includes
There are several server configuration presets you can use for the NI Web Server. We recommend starting with “Simple local access” while developing your web application and then moving on to one of the other configurations once you’ve verified your web application is working correctly.
Simple local access will only allow access to the NI Web Server, and applications hosted on the NI Web Server, from that local PC. Other machines on the local area network will not be able to connect to the server.
SystemLink Tags and Messages have multiple permission levels available in order to restrict access to different users if needed. These settings can be found in the Applications tab of the NI Web Server Configuration tool. The group of settings for Tags and Messages can be found under
The Username and Password used to sign into the application at the Open Configuration Node will determine the level of access to SystemLink Tags and Messages in that application. For example, if the permission level for “Read Current Tag Values and Properties” is set to Admin, the Admin username and password will be required at the Open Configuration Node upon start of the application. If a user role’s username and password is used for the Open Configuration Node upon start of the application, that application will not be able to read Tag values and properties.
Keeping these permissions in mind when setting up the NI Web Server and when deploying your applications is important.
For more information about how to use SystemLink Tags and Messages, see the SystemLink Manual.
To access your WebVI, go to http://localhost:[Port]/[Output Build Folder Name]/[WebVI name].html. If the default port 80 is used, no port in the url is needed. For the examples used in this tutorial, the URL will be http://localhost/Temp Monitoring WebVI/index.html.
Now that you have successfully tested your WebVI hosted on the NI Web Server using the Simple Local Access configuration, I recommend proceeding with one of the other NI Web Server security configurations. Either of the Remote Access configurations will allow other computers on your local area network to access the NI Web Server and the WebVI hosted on it. Insecure Remote Access does not encrypt traffic, such as data, user names, and passwords, when communicating between a WebVI and the NI Web Server. Secure Remote Access will have clients connect securely to the server using HTTPS after creating and importing a certificate to each of the clients. It is recommended that Secure Remote Access is enabled to allow for safe communication between WebVIs and the NI Web Server. This next section will guide you through setting up the NI Web Server using Secure Remote Access.
If you have trouble connecting to your WebVI, try using the IP Address of the server instead of the host name. You can also try accessing your NI Web Server login page (https://[host name or IP address]/) to verify you can connect to the server. If you still can’t access your WebVI or the NI Web Server, try these approaches
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.