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); _server.Connect(netCred);
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: 172.19.30.185. 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?