Connecting Tech Pros Worldwide Forums | Help | Site Map

Impersonation - using Impersonate with NewCredentials

Newbie
 
Join Date: Jan 2008
Posts: 15
#1: Nov 12 '08
Hello,

I'm trying to implement impersonation.

When I use LogonUser with LogonSessionType.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 LogonSessionType.NewCredentials and afterwards do DuplicateToken (to get the SecurityImpersonation 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

Reply


Similar .NET Framework bytes