steinroar

Accessing PI Point value through AF SDK ([-10722] PINET: Timeout on PI RPC or System Call)

Discussion created by steinroar on Nov 13, 2013
Latest reply on Nov 13, 2013 by Gregor

Hello, I'm trying to retreive the value of a PI Point using the PI AF SDK. Connecting to the AF Server works fine, but getting the attribute value failes with the error:

 

[-10722] PINET: Timeout on PI RPC or System Call

 

I will try to explain my scenario:

 

1. Small .net 4.5 application with AF SDK 2.5 running against PI AF 2012 installation
2. I'm able to connect to the AF server using a Windows account on the server
3. PSE works, but I have to connect to the PI Server using the piadmin user (through Connect As...)
4. IP and User trust has been created on the PI Server
5. PSE on the AF Server works
6. Same result when trying to access the PI Point value directly through OSIsoft.AF.PI.PIServers etc.
7. EventViewer on server says: "Unknow username or bad password" and refers to my client Windows user account (not the one I supplied in the Connect()-method call).
8. The AF Client and the AF Server (and SQL Server) is on separate domains.

 

I guess this has something todo with the authentication of my user, do anyone have a suggestion on what I am doing wrong here? I have included  the sample code below.

 

Through AF

 

PISystems pisystems = new PISystems();
PISystem pisystem = pisystems["AFTEST"];
pisystem.Connect(new NetworkCredential("AFWINSERVERNAME\\AFClientUserName", "Password"));
AFDatabase afdb = pisystem.Databases["AFDATABASE"];
AFNamedCollectionList elementList = AFElement.FindElements(afdb, null, "TestElement", AFSearchField.Name, true, AFSortField.Name, AFSortOrder.Ascending, 100000);

foreach(AFElement afelement in elementList) {
   AFAttribute afattribute = afelement.Attributes["Value"];
   AFValue afvalue = afattribute.Data.RecordedValue(new OSIsoft.AF.Time.AFTime(DateTime.Now), OSIsoft.AF.Data.AFRetrievalMode.Before, afattribute.DefaultUOM);

 

}

 

Directly to PI Server

 

OSIsoft.AF.PI.PIServers piservers = OSIsoft.AF.PI.PIServers.GetPIServers();
OSIsoft.AF.PI.PIServer piserver = piservers["192.168.44.129"];
piserver.Connect();
OSIsoft.AF.PI.PIPoint pipoint = OSIsoft.AF.PI.PIPoint.FindPIPoint(piserver, "SINUSOID");

 

Thank you for any help,
Stein-Roar 

Outcomes