AnsweredAssumed Answered

Authentication issues when programmatically inserting values

Question asked by Ahlywog on Oct 20, 2016
Latest reply on Oct 26, 2016 by Ahlywog

System.Security.SecurityException: Cannot write data for Attribute 'Test' in Element 'Surface Obs' in Element 'HMS Weather Stations' because the current user does not have WriteData permission.

   at OSIsoft.AF.AFObject.CheckWriteDataPermission()

   at OSIsoft.AF.Data.AFData.CheckWriteDataPermission()

   at OSIsoft.AF.Data.AFData.UpdateValue(AFValue value, AFUpdateOption option,  FBufferOption bufferOption)

   at OSIsoft.AF.Data.AFData.UpdateValue(AFValue value, AFUpdateOption option)


This is the error that I'm getting when using:





testAttribute.Data.UpdateValue(new AFValue(999, DateTime.Now), AFUpdateOption.Insert);


I can retrieve the element and element just fine, but can't update with a new value.  I've tried messing with trusts and mappings and permissions and nothing seems to work.  I'm new to PI so I'm not sure what else to do.