francisbeliveau

AF.PI Connection

Discussion created by francisbeliveau on Dec 12, 2013
Latest reply on Dec 13, 2013 by cmanhard

Hi,

 

I'm currently developing a Windows service which connects to PI using OSIsoft.AF.PI.PIServer.Connect(). The "Log On As" option of our service is set to a Windows account trusted by AF. This setup works perfectly.

 

The disadvantage of this setup is every time we reinstall our application we have to set again the option "Log On As" and we would like to avoid this supplementary step in the installation process. So, I tried to use OSIsoft.AF.PI.PIServer.Connect(NetworkCredential) where the network credential contains the same settings (domain , user, password) as the "Log On As" options. Unfortunately, I receive a PI exception every time saying  "Insufficient privilege to access PI Server". 

 

I don't understand why the second way doesn't work.

 

Could someone enlighten me about this issue?

 

Thanks!

Outcomes