Access denied - Query didn't pass security validation error when trying to access AF via Pi Web Services

Discussion created by asanford on Sep 28, 2010
Latest reply on Nov 16, 2012 by Henryk Schneider

I have just got PI web services 2010 working; I can read time series data from a pi path ("pi:\\MyServer\cdt158") fine. However, I cannot seem to read that same data using an AF path (such as "af:\\MyServer\Database1\MyElement1|MyTimeSeriesNumber1").  I get the following error message returned: "[PI SQL (AF) Service] Access denied. Query didn't pass security validation" I see similar errors in the windows app event log.  How do I debug this?  In PI/AF system explorer, I can see that I have full read/write access to this element and attribute, and I my account is also listed in the AFServers security group.  The service account the IIS app pool is using this same account, as is the client calling the web service.  I am using basic http binding with no security - I had some trouble (even with the PI paths) getting the wsHttpBinding working reliably (perhaps due to my slow remote connection to my domain - my ws calls were timing out.)  I know the AF query is working to some extent, because if I change the db name to a bogus name ("Database2", for example), I get a good error saying it couldn't find that db.  Also, I get the same access denied error if I specify a non-existing element name ("af:\\MyServer\Database1\MyElement2|MyTimeSeriesNumber1").  So maybe it is some problem with security on Database1?


Any help would be much appreciated.  Thanks!