1 Reply Latest reply on Aug 8, 2018 6:49 PM by Marcos Vainer Loeff

    IIS Impersonation



      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


      Finding server...

      Server is xxxxxxxxxxxxxxxxxxxxx

      Opening connection...

      Unable to open a session on a server. [-10431] Authentication method is disabled by current server policy

        • Re: IIS Impersonation
          Marcos Vainer Loeff

          Hello Pierre,


          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!