Roger Palmen

Potential causes for AfAttribute.GetValue to return "The requested server is not currently available"?

Discussion created by Roger Palmen on Jul 7, 2014
Latest reply on Jul 9, 2014 by asorokina

Hi all,

 

I have these whopping 3 lines of code to get the value of an AF attribute. The attribute is a PI point on a PI server having a trust on the hostname where the application is run.

 

 

 
AFTime aftime = new AFTime("*");
AFAttribute attr = AFAttribute.FindAttribute(strElement, null);
AFValue attrval = attr.GetValue(aftime);

 

 

I run this little application using windows task scheduler. If i run the scheduled task under my own account, it runs fine and returns the value. However, if i run this using a service account (which has restrictions applied), i do not get an exception, but the  AFValue (attrval.ToString()), returns "The requested server is not currently available".

 

Any ideas what would cause this behavour? Only think i can think of is the known servers table. That is stored in registry, but as i can connect using my own account, i assume this cannot be the issue. Any ideas where to look? I was hoping to get an exception and some details in the trace, but the code runs without problems.

 

I have no access to the PI server (except reading data), so checking logfiles will be difficult, thus i prefer to diagnose from the node where i run the task.

Outcomes