Using AFSDK with WCF Service and impersonation

Discussion created by eignert on Apr 12, 2013
Latest reply on Apr 18, 2013 by Gregor



I'm currently working on a WCF service that uses the AFSDK to access PI (AF).
I'd like to work with impersonation for some methods the service provides.


Calling methods from the AFSDK works fine without impersonation, but as soon as I set the

[OperationBehavior(Impersonation = ImpersonationOption.Required)]

 attribute on the method of the WCF service I'm getting the following error:


Could not load file or assembly 'OSIsoft.AFSDK, Version=, Culture=neutral, PublicKeyToken=6238be57836698e6' or one of its dependencies. Exception from HRESULT: 0x80070542


It might be that this is more a basic configuration issue with WCF services and third party dlls but maybe someone already experienced the same problem?