A common cause for this is when the configuration in the Tools»Options»Web Server: Configuration menu is set correctly only for the development environment, and not the executable. To correct this, follow the steps below for your respective version of LabVIEW:
LabVIEW 7.1
After building an executable and deploying it, you will see in the configuration that Enable Web Server setting is no longer checked, and Root Directory is no longer set to C:\Program Files\National Instruments\LabVIEW X\www (the default directory where LabVIEW saves the .HTM file for your VI).
In order to get the remote front panel to work with your executable:
1.Run the executable.
2.Navigate to the Tools»Options»Web Configuration menu and place a check mark next to the Enable Web Server setting.
3.Set the Root Directory field to the directory where you saved the .HTM file generated from the Web Publishing Tool. As mentioned above, the default directory is C:\Program Files\National Instruments\LabVIEW X\www.
Alternatively, you can edit the .INI file for your executable as described in the "LabVIEW 8.0 and later" section below.
LabVIEW 8.0 and later
Each LabVIEW executable has a .INI file associated with it, and it is typically found in the same directory as the .EXE file. You can add the appropriate tokens to this .INI file to enable the web server in two ways:
Set the appropriate configuration settings in the LabVIEW development environment by following the steps described in the LabVIEW 7.1 section, and then apply these settings to your executable by enabling the Use the default LabVIEW Configuration file (LabVIEW.ini) setting in your Application (EXE) Build Specifications. In your Build Specification properties, this setting can be found under the Advanced section.
Manually edit the executable's .INI file with any text editor and add the following lines:
[ApplicationName]
WebServer.Enabled=True
WebServer.RootPath=C:\Program Files\National Instruments\LabVIEW X\www
Note:
1.WebServer.RootPath must be the path of the directory where you saved the .HTM file when you generated it in the LabVIEW Web Publishing Tool. The path shown in the example above is the LabVIEW default path.
2.Your executable should have the same name as your VI. For example, if your VI is called MyApplication.VI, your executable should be MyApplication.EXE.
3.The [ApplicationName] field in your .INI file should have the same name as your VI. Example: [MyApplication].
4.Your .INI file should have the same name as your VI. Example: MyApplication.INI.
5.Your .HTM file should have the same name as your VI. Example: MyApplication.HTM.
6.NI recommends that you save all your associated files in the same folder.
The LabVIEW Internet Connectivity Toolkit expands the functionality of LabVIEW to include native interaction with popular internet protocols. Developers can easily utilize the existing internet infrastructure to remotely interact with VIs, transfer acquired data, and even serve and password protect sensitive information using the included G Web Server and CGI functionality. Low and high-level VIs can be used for varying degrees of control and complexity.