AnsweredAssumed Answered

AFSDK: How to connect to a PI system across domains thru AFSDK C#?

Question asked by gortega on Dec 18, 2014
Latest reply on Dec 16, 2015 by PetterBrodin

Hi there,

I am writing an application that connects to different PISystems, the following code works when connection locally or but it does not work if try to connect to a PISystem on a different domain.

**************************code snippet******************************

PISystems piSystems = new PISystems(); //for instance my computer is in domain ""

PISystem targetPISystem = piSystems.Add(afServerName); //PIOPS

targetPISystem.ConnectionInfo.Host = piHostName; // for instance the host name is hosted on  ""

AFDatabase afDatabase = targetPISystem.Databases[afDatabaseName];// Operations


targetPISystem.Databases has not items, so afDatabase is always null


How to connect to a PI system across domains using the AFSDK?

I am not sure what I am missing


NOTE: Thru PI System Explorer it prompts a login screen when trying to connect to the remote PiSystem , but again I am not sure how to set this in code


Thanks for your help