AnsweredAssumed Answered

Connecting to a PIServer with a domain user

Question asked by PetterBrodin on Dec 15, 2015
Latest reply on Feb 26, 2019 by Weikang

I'm trying to use the AF SDK to connect to a PI Server like this (simplified):

PIServers piServers = new PIServers();
_server = piServers[serverName];

string domain = mydomain;
string username = myusername;
string password = mypassword;

NetworkCredential netCred = new NetworkCredential(username, password, domain);



I've mapped the user to the piadmins Identity on the PI Server, but when I try to connect, I get an exception with the message "Cannot connect to the PI Data Archive."


In the PI Message Logs I get the following message: "Unsuccessful login  ID: 105. Address: Name: God.Tag.Server.Console.vshost.exe(1748):remote. Credentials used: petter.brodin. Method: Explicit Login. Error: [-12001] Name Not Found in PInt"


Is there any reason why this shouldn't work? Is there a better way to approach this when attempting to log in with a domain user?