Error Connecting to VeriStand Server from the .NET API

Updated May 18, 2018

Reported In

Software

  • VeriStand
  • VeriStand 2017 Full

Issue Details

I'm referencing the example of the Veristand .NET API and when I try to deploy to my target I get an error that says.
 
An unhandled exception of type 'NationalInstruments.VeriStand.VeriStandException' occurred in NationalInstruments.VeriStand.ClientAPI.dll

Additional information: Could not connect to the VeriStand server.  Make sure you have the correct address to the gateway, the gateway is running, and any firewalls are configured correctly before attempting to connect.


 
Why does this happen and what can I do to succesfully deploy my project?
 

Solution

This error is caused by specifying an incorrect IP address to the gatewayIP variable in the example included in the documentation, the IP address that needs to be referenced is that of the system that will act as the gateway and that will deploy the System Definition File (SDF). The specific line were this is specified in the example is the following one:
 

// The path to the system definition file and the IP address of the target to which you want to deploy the system definition file
String sineWavePath = "C:\\Users\\Public\\Public Documents\\National Instruments\\NI VeriStand 2011\\Projects\\Example\\Sinewave Delay.nivssdf";
String gatewayIP = "localhost";

 

To review the procedure for system deploments on Veristand you can reference the Getting Started Guide

In order to succesfully run this example and deploy the SDF the gateway computer has to be running VeriStand before this example code is executed, if it is not it will result in a connection issue.
 

Additional Information

The C# example included in the NI VeriStand™ .NET API document specifies that the IP address that needs to be used is the one of the target to which the SDF will be deployed, this is incorrect and has been reported in the Corrective Action Request #692189, future release notes of VeriStand should specify if this particular error is corrected for that version.

 

WAS THIS ARTICLE HELPFUL?

Not Helpful