11-12-2025 09:04 AM
I have a mature application that connects to a network device using .net via a vendor supplied DLL. The PC and hardware setup is replicated on 15 sets of hardware.
When a PC fails, e.g. failed HDD, I use Acronis to clone one of the working PCs and use that Acronis image to restore the failed PC.
This works well most of the time, but occasionally after the cloning process, LabVIEW fails to connect to the networked device.
I can ping the device, and also control the device via the vendors front end, but LabVIEW .net fails to connect via the DLL.
NetworkInterface>GetAllNetworkInterfaces returns the names of all NICs.
So far I have tried:
-resetting all NICs
-uninstalling and re-installing Microsoft .NET SDK
-moving the network card to a different PC slot.
-netsh winsock reset, netsh int ip reset.
-ipconfig /release /renew /flushdns.
-Uninstall and reinstall of the Network Adapter from Device Manager.
-tried using a different Network Adapter, the PC has 3 in total.
-reinstall of the device vendor software.
The LabVIEW code and associated DLL runs successfully on all the other PCs, so I figure the problem must be a software component used in the call chain or a configuration item on the PC. In the past, I've solved the issue by cloning a different PC, but that's not an option at present as I have just installed Win10 IoT LTSC so I only have this one new Windows installation to debug with.
11-12-2025 11:39 AM
The error shown when it fails to connect doesn't indicate a problem with LabVIEW in any way. It just states that it can't find anything on the network to connect to.
Generally when you use code to connect to something on the network, you want to make it so it either connects to a list of IP addresses or hostnames, or it uses some form of network discovery. Your code appears to be using the network discovery approach.
I would look into two different things:
First, see if there's any alternate methods you can use to get a list of network controllers, such as specifying addresses instead of just hoping that the network discovery works well.
Second, check the documentation or contact the vendor to see if they can give you details on what it takes for a network controller to be "discovered". It could be that you need to relax the firewall on your system, or it only looks on certain network adapters, or that there's a service that runs in the background that you need to configure, or that the controllers have been marked as "reserved" by a different host, or any number of other things.