LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to activate web server in exe

Solved!
Go to solution

Hello,

 

I have a problem with starting a web server. I have Vi that feeds the address of the directory to publish and after that it makes the server enable. And in the directory there are a few html files and a few jpg files. And the jpg files are attached to the html files. And then there are a few vi that appends other Vi:s front panels to images. And as the program runs the the image files in the server directory are over written (updated). So the point is to access via Web browser to the site where is some hyper links and behind he links are the photos of the few front panels. And my applications automatically updates the images.

 

Problem is that the server won't go on when I built and run the application. In development environment this works perfect. I tried this on a different PC also but the exe won't connect the server on either of the computers.

 

Need help, thanks


There is the web server start file attached.

 

Version is 8.2

0 Kudos
Message 1 of 5
(2,915 Views)
Solution
Accepted by Green_man

Hello!

 

http://digital.ni.com/public.nsf/allkb/3B2160B128EE09A886256B60006FFA66

 

Executing Web Server in LabVIEW executeable application is different compared to development environment. Please look at the link above and try that if it could help you out.

 

BR,

Make Nguyen

National Instruments Technical Support

0 Kudos
Message 2 of 5
(2,865 Views)

Hi,

 

 

The instructions points out that some modification must be made to the .ini file. But that instruction page is made with labview 8.6 and I have version 8.2. There are a few differences like:

 

postScriptLevel2=False   <---- My configuration file misses that part
WebServer.Enabled=True   <----  That one is a bit different

 

This got me thinking though. Is the configuration file written in the stone? I mean that my application programmatically sets the server directory and then enables the server. This is because the directory changes when the application is installed in to another PC. And I checked that Both the server directory and server activation function work in stand alone application as quote

"

Remarks

 

The following table lists the characteristics of this property.

 

Remote access disallowed Yes
Available in Run-Time Engine and Real-Time Operating System Yes
Permissions Read/Write 

"

So do I have to separately and programmatically overwrite the configuration file?

 

Here is the contents of the configuration file in text

 

server.app.propertiesEnabled=True
server.ole.enabled=True
server.tcp.paranoid=True
server.tcp.port=1042
server.tcp.servic=""
server.vi.callsEnabled=True
server.vi.propertiesEnabled=True
WebServer.DirectoryIndex="index.htm"
WebServer.MimeTypes="htm;text/html;gif;image/gif;jpg;image/jpeg;png;image/png;txt;text/plain;html;text/html;jpeg;image/jpeg;css;text/css;llb;application/x-labview-llb;vi;application/x-labview-vi;doc;application/msword;dot;application/msword;bin;application/octet-stream;exe;application/octet-stream;rtf;application/rtf;pdf;application/pdf;ai;application/postscript;eps;application/postscript;ps;application/postscript;csh;application/x-csh;gtar;application/x-gtar;gz;application/x-gz;sh;application/x-sh;tar;application/x-tar;zip;application/zip;hqx;application/mac-binhex40;ua;audio/basic;wav;audio/wav;tif;image/tiff;tiff;image/tiff;xbm;image/x-xbitmap;rtx;text/richtext;qt;video/quicktime;mov;video/quicktime;avi;video/x-msvideo;movie;video/x-sgi-movie;aif;audio/aif;aifc;audio/aif;aiff;audio/aif;aim;application/x-aim;dif;video/x-dv;div;video/x-dv;js;application/x-javascript;pntg;image/x-macpaint;xlb;application/vnd.ms-excel;xls;application/vnd.ms-excel;ppa;application/vnd.ms-powerpoint;ppt;application/vnd.ms-powerpoint;pps;application/vnd.ms-powerpoint;pot;application/vnd.ms-powerpoint;pwz;application/vnd.ms-powerpoint;mid;audio/mid;midi;audio/mid;enc;video/mpeg;m1v;video/mpeg;mp2;video/mpeg;mpa;video/mpeg;mpe;video/mpeg;mpeg;video/mpeg;mpg;video/mpeg;psd;image/x-photoshop;bmp;image/bmp;pic;image/pic;ra;audio/vnd.rn-realaudio;rf;image/vnd.rf-realflash;rm;application/vnd.rn-realmedia;rp;image/vnd.rn-realpix;ram;audio/x-pn-realaudio;rmm;audio/x-pn-realaudio;rnx;application/vnd.rn-realplayer;rt;text/vnd.rn-realtext;rv;video/vnd.rn-realvideo;smi;application/smil;ssm;application/streamingmedia;sithqx;application/mac-binhex40;sit;application/x-stuffit"
WebServer.Port=1024
WebServer.RootPath=C:\projektit\labview\Meslog\Meslog D\FIN\uusi_sarjaliikenne\2013\06_05_2013BETA\Web serveri lisäosa
WebServer.TcpAccess="+*"
WebServer.ViAccess="+*"
DebugServerEnabled=False
DebugServerWaitOnLaunch=False
server.tcp.enabled=True
server.vi.access=""
WebServer.LogEnabled=True

 

By the way I'm adding my application to a larger softwaret that some one else has done. To avoid possible confusions.

 

 

0 Kudos
Message 3 of 5
(2,848 Views)

I manage to solve this on my own. The configuration file had to be written in the program to make it work. I had also path issues too but those are all solved.

0 Kudos
Message 4 of 5
(2,819 Views)

Hi,

 

can you Please tell me about this issue how you solved because Iam having same problem.

0 Kudos
Message 5 of 5
(811 Views)