AnsweredAssumed Answered

PI Server Connection using AF SDK

Question asked by YunLi on Oct 28, 2017
Latest reply on Nov 2, 2017 by YunLi

New to AF SDK. How do I use PIServer.Connect() to connect to a server? The connection has the following property when I connect to it with PI ProcessBook (I omit the server name and IP address for obvious reason):

 

Port Number: 5450

Default User Name: pidemo

Connection timeout: 10 seconds

Data access timeout: 60 seconds

Connected User: PI Trust as piuser

Connection Type: PI3 protocol 3.5

PI Version: PI 3.4.400.1162

Operating System: Windows NT AMD64 6.2.9200

 

If I just use the simple defPIServer.Connect(), it gave me an error: "Cannot connect to the PI Data Archive. Windows authentication trial failed because insufficient privilege to access the PI Data Archive. Trust authentication trial failed because insufficient privilege to access the PI Data Archive."

 

Here is the simple test code:

PIServers myPIServers = new PIServers();

PIServer defPIServer = myPIServers.DefaultPIServer;

defPIServer.Connect();

 

 

 

 

 

 

Outcomes