We try to make a simple web page to check if impersonation works on IIS (Windows server 2008 R2).
We are able to see the identity adding log information in our page (result below).
But it seems PISDK do not use the impersonation user.
Any Idea of what is wrong ?
Before Impersonation ...
currentWindowsIdentity Name : IIS APPPOOL\DefaultAppPool
currentWindowsIdentity AuthenticationType : Negotiate
currentWindowsIdentity ImpersonationLevel : None
Inside Main ...
currentWindowsIdentity Name : EUA\PJANIN
currentWindowsIdentity AuthenticationType : NTLM
currentWindowsIdentity ImpersonationLevel : Impersonation
Server is xxxxxxxxxxxxxxxxxxxxx
Unable to open a session on a server. [-10431] Authentication method is disabled by current server policy
Please refer to this blog post which talks about impersonation with PI AF SDK. I think it should work with PI SDK as long as the impersonation logic is the same.
Why are you using PI SDK by the way? PI SDK is deprecated. PI AF SDK is an active PI Developer Technology which has more methods available and better performance.
I would first check if impersonation works with code snippets provided in the post.
Hope this helps!
Retrieving data ...