AnsweredAssumed Answered

Change PI Current User

Question asked by PedroCampos on Aug 26, 2019

I would like to know how can I change PI Current user in various different plataforms, as:

  • PI SMT
  • PIAFSDKUtility
  • PI AFSDK C# custom applications to use PIServer.Connect() and PISystem.Connect().

We work with a Azure PI System Development enviroment. This Azure virtual machine have a domain. But we access from other machines in our company domain or other clouds with other domains.

I also have diverent credentials, on as sysadmin other as regular user and I have to switch between those credentials sometimes.

Otherwise, login with credentials for custom AFSDK applications like is not able if "Disable explicit login" is marked on PI SMT, so I can' use explicit NetworkCredential and I do need PIServer.Connect() out of domain. How can I do that setting a especific user?

 

NetworkCredential credential = new NetworkCredential("guest", String.Empty);    myPISystem.Connect(credential);
    myPIServer.Connect(credential);

Outcomes