LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI-Server Access denied

When I use VIserver locally, everything is OK.
When setting all parameters under tools>TCP-IP viserver etc and grand access to 127.0.0.1, activate TCP/IP ....
I receive an access denied error. 
 
In attachment you will see a test program that illustrates my problem.  First step in sequence shows your access right (+127.0.0.1 in my case), is server is running etc.  That work fine because I use "local reference" (="").  When I use the IP address of the localhost --> access denied.
 
What is going wrong?  I have this problem on 2 different PC's and after 3hours testing, grrrr.
 
Can you help me?
0 Kudos
Message 1 of 8
(6,434 Views)

This is a tricky one, however I think I have the explanation for you.  First notice that the error is not from the Open Application Reference, but instead the property node.

The help for the Srvr.VIAccess states: "Attempts to access the property on a remote application will result in a permissions error"

So when you do not input an IP or you use an empty string, you are on the localhost, therefore you can all the Property.  However, when you actually type in the IP or computer name, the IP has to be resolved etc, and the Application reference is now to a "Remote" PC.  Because it is now a remote application you get an error when you call the property.

0 Kudos
Message 2 of 8
(6,427 Views)
Evan, here's a trickier question:
The help says that when you wire localhost, you get an application reference for the RTE. The question is what happens when you're running multiple EXEs.
Since each EXE is supposed to be able to run completely indepedent from the others (e.g. load different VIs with the same name), how do I know which of those "applications" it will connect to?
The first one opened? The last one opened?
What happenes if I want to connect to more than one EXE? Or just to a specific one?
How about connecting to a different version of LV\the RTE? Can this only be done through ActiveX?
Confused\wondering...

___________________
Try to take over the world!
0 Kudos
Message 3 of 8
(6,414 Views)

OK, I finally got around to actually looking for the answer, and it seems the trick is the port number. If each EXE is given a different VI server port number, that should help in distinguishing them. There still remains the question of what happens if you have 2 EXEs with the same number, but that doesn't really matter now.

I consider this a problem in the documentation for the Open Application Reference help. I think it should state that if you want to open connections to different executables, you need to assign each of them a different port (which seems obvious now) and wire the correct number in, and that will do it.


___________________
Try to take over the world!
0 Kudos
Message 4 of 8
(6,387 Views)
I'm trying to run multiple slave EXEs and have a master" EXE control their functionality. If I understand correctly, each slave EXE needs a unique TCP port #, but aside from the TCP port # in >Tools>Options>VI Server Cfg. I do not see how to do that.
Does that port # go into the EXE's .ini file (which I don't see it in there) or is it embedded in the .exe at build?
Thanks,
Dave
0 Kudos
Message 5 of 8
(5,988 Views)
The port info is in the ini.
Something like this:
 
server.tcp.port=3363
server.tcp.enabled=TRUE
server.tcp.access="+127.0.0.1"
0 Kudos
Message 6 of 8
(5,980 Views)
With TCP enabled and port 3373 entered prior to exe build, the only server-related lines in the ini are:
 
server.tcp.paranoid=True
server.tcp.servic="My Computer/VI Server"
 
I tried port 3373 b/c I seem to remember in a different problem where the ini line didn't show up if I used the default. I'm sure I'm not doing everyting correctly, but I don't know yet what it is. Any advise would be appreciated.
Thanks,
Dave
0 Kudos
Message 7 of 8
(5,977 Views)

Check what Mike Porter reported in reply #14 of this thread.

The ini token has changed to something cryptic (this is good) but it can be written by VI running on the target machine.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 8
(5,968 Views)