Programmatically Start and Stop the LabVIEW Web Server

Updated Nov 3, 2017

Issue Details

I have an application that I want to publish on the web, but I would like the ability to programmatically start and stop the LabVIEW Web Server rather than having to manually start it from Tools >> Web Publishing Tool... or from Web Server: Configuration Options.


You can use VI Server to programmatically enable and disable the LabVIEW Web Server.
  1. Open an Application Reference (Functions >> Application Control >> Open Application Reference) to the local version of LabVIEW. By leaving the machine name input of the Open Application Reference VI blank, LabVIEW automatically defaults to the local machine.
  2. Wire a property node to the LabVIEW Application Reference output, and select the property Web Server: Server Active.
  3. Right-click on the property and select Change to Write. This property accepts a boolean input and determines whether the Web Server is turned on or off.  An example of using this property node is shown below:

As explained in the context help, this property can only be accessed from the local copy of LabVIEW. Any attempt to access this property from a remote application will result in a permission error.  In addition, any active connections to the web server that are open when this VI is called will not be automatically closed. You must call Server Close Connection in order to end these active connections.


Not Helpful