Why Does TCP Open Connection VI Work With A Port Number But Not A Service Name?

Updated May 31, 2018

Reported In


  • LabVIEW

Issue Details

I am building a TCP application and when I use a named service to connect to my server the "TCP Open Connection.vi" times out, but always connects across my network when I have a port chosen.  Why does it not find the service name?


This is most likely due to a firewall or network security issue.  You can try disabling your firewall or have IT assign you a port for your application that you can then use instead of a named service.  You can also try opening your Firewall Settings and add the NI Service Locator to an exception to the firewall.

Additional Information

The issue is that when you target a port exactly, your application on the server computer is handling the communication and therefore will be able to respond.  When using a named service, Windows will assign a port dynamically to your application on the server side which the client will have to request access to through the Windows Firewall.  Windows may interpret this as a security violation and not allow NI Service Locator to function properly.