First: I forgot to warn you that you need to skip the first section of Building HTTP Server Into Your LabVIEW Application.doc, because that is actually describing how to use the built-in LabVIEW Web Server, not the Internet Toolkit server. The pre-5.1 instructions are the ones that are relevant for you.
> I already add the HTTP Dynamic VIs.vi as a dynamic VI and add
> "WebServer.Enabled=True" in INI file.
You should actually leave out this INI setting in your case. It enables the non-toolkit LabVIEW Web Server, whereas you need the toolkit version of the server, and enabling both on the same port would actually prevent the toolkit server from starting.
> When I run my exe file, the HTTP Server doesn't come out. Do I
> need to add any program to open the HTTP Server?
Yes--the Word document explains that you need to use the HTTP Server Control subVI (from the top-level ITK palette) on your main VI's diagram to kick the server off and then shut it down when the VI is done. Unless you do this, the server VI will never actually start.
> Where should I place the html file and how to set the DocumentRoot?
> Moreover, I want to control who can access the server, how and
> what file should I add when I building exe file?
The EXE will look for the same set of configuration files that the LabVIEW-environment server uses. I suggest that you take your entire <labview>\internet folder tree and copy it to the same directory as your executable. (I'm actually not even sure how to override the default settings so that the EXE looks elsewhere.) After you do this, you can dig into internet >> http >> conf and edit the configuration files for the EXE-embedded server. The port is set in lvhttp.cfg, and the server root is defined in srm.cfg .
As for access control, it works exactly the same way as in LabVIEW. You can create an htaccess.txt file in any directory that you want to password-protect. I haven't really used this feature, but you clearly have it working on the development system, so you should be able to duplicate the configuration for the EXE.
Horribly complicated, yes.
--John
Message Edited by Johnner on 03-11-2005 09:49 AM
Message Edited by Johnner on 03-11-2005 09:50 AM