Jump to content

How do I start my WebServices from an executable?

Recommended Posts

Hey everybody,

once again i have some trouble with my webservice VI and hope you guys can help me out! Iam using LV 2010.

This time I want to start my Webservices through an executable. I have a project with a MainVI which interacts with the WebServiceVis. It already worked fine, when i started it from the developer Environment.

Now I held on to the Instruction from NI and created an executable after these specifications:


I tested the build executable on another computer. I avoid to use the LV developer environment on this PC, so i did not build and deploy my webservice before i start the executable. The MainVi is working, but the webmethods are not! I get no Error Message. I just can´t access my web methods over the browser.

I give you the code of the application.ini:




and the code of the niwebserver.conf

# Web server configuration file.

# Generated by LabVIEW 10.0

# 06.06.2011 13:39:20


# Global Directives


ErrorLog "$LVSERVER_ROOT/logs/error.log"

LogLevel 3

CustomLog "c:/Programme/National Instruments/LabVIEW 2010/resource/webserver/logs/access.log" "%h %l %u %t \"%r\" %>s %b"

TypesConfig "$LVSERVER_ROOT/mime.types"

ThreadLimit 10

LoadModulePath "$LVSERVER_ROOT/modules" "$LVSERVER_ROOT/LVModules" "$LVSERVER_ROOT/.."

LoadModule LVAuth lvauthmodule

LoadModule LVSnapshot lvsnapshotmodule

LoadModule LVRFP lvrfpmodule

LoadModule dir libdirModule

LoadModule copy libcopyModule

Listen 8000


# Directives that apply to the default server


ServerName LabVIEW

DocumentRoot "C:/Programme/National Instruments/LabVIEW 2010/resource/webserver/../../www"

Timeout 60

AddHandler LVAuthHandler

AddHandler LVSnapshotHandler .snap

AddHandler LVRFPHandler

AddHandler dirHandler

AddHandler copyHandler

DirectoryIndex index.html

KeepAlive on

KeepAliveTimeout 60

I have two suspicions what could be the problem.

First, the instruction says nothing about adding the Web Service Build file( application.lvws) to the executable Build. Perhaps, i have to do that, to get my executable to run....

Second, I don´t know with what WebServer i interact. In LV2010 there is the RemotePanelServer and the WebApplicationServer. When I now write "WebServer.Enabled=True", what Service is invoked? The NI documentation does not distinguish between RemotePanelServer and the WebApplicationServer... In my System the RemotePanelServer runs on port 8000 and the WebApplicationServer runs on port 8080. It´s not possible to let them use the same port.

Lot´s of question. If something is not understandable or you need more Code to get the context, let me know! Thanks to anybody who´s reading my mess ;-)



Link to comment

You must install your web services on the target. So, once you build your exe and your web service (lvws), you must build an installer and have it install the exe and the web service. Then, after you run this installer on the target PC, the web service will always be up and running.

the default port for the Application Web Server (the one that hosts user generated web services) is 8080. So, all your calls must point to this port. You cannot assume the default port 80 will work.

You can change this in the settings for the application web server on the target after you install, if you want. You could even make a batch file that the installer runs at the end to do this change automatically.

I just decided to leave it on port 8080.

good luck!


Link to comment

Hey John,

thanks for your advise. I will try it with the Installer, like you said.

The problem with the RemotePanelServer and the WebApplicationServer is, that i need both for my program. This is because the RemotePanelServer gives access to the WebServerRootPath (default is National Instruments\Labview2010\www). I use this Root Path as a Shared Folder over the Network, to dynamically exchange data between the HostPC and the ClientPC, which uses the WebInterface.

This is the reason I have to approach the RemotePanelServer and the WebApplicationServer separately...



Link to comment

Hey John and everybody whos reading,

thanks a lot, the aproach with the installer was succsessful. The installer deploys the lvsw file directly after installation (not on application startup!).

Concerning the topic of the difference between RemotePanelServer and the WebApplicationServer: In my opinion every setting i took in app.ini and niwebserver.conf was for the remotepanelserver. I conclude that, because in both files i using the remotepanelserver port(8000) and while the WebApplicationServer is on port 8080.

So everthing works fine so fa, BUT.... :-)

I have still problems with some shared variables i am using in my project for connecting the main.vi with the webmethods. They are not working on the other TargetPC where the executable is run. I already sitched on "deploy shared variables at startup" in the executable build properties. Do i have to do anything else????

So thanks a lot!

Greetz Fred

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.