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=220.127.116.11, 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?