Hello,
I'm trying to implement impersonation.
When I use LogonUser with LogonSessionTyp e.Network I get a token which I pass into the WindowsIdentity constructor. That seems to work - I get an identity with the expected name.
However, when I use LogonSessionTyp e.NewCredential s and afterwards do DuplicateToken (to get the SecurityImperso nation token)
the WindowsIdentity object I create seems to still be my own identity.
Impersonate on that identity doesn't change the current WindowsIdentity .
Is there something I'm missing?
thanks,
Frankie
I'm trying to implement impersonation.
When I use LogonUser with LogonSessionTyp e.Network I get a token which I pass into the WindowsIdentity constructor. That seems to work - I get an identity with the expected name.
However, when I use LogonSessionTyp e.NewCredential s and afterwards do DuplicateToken (to get the SecurityImperso nation token)
the WindowsIdentity object I create seems to still be my own identity.
Impersonate on that identity doesn't change the current WindowsIdentity .
Is there something I'm missing?
thanks,
Frankie