Method | Description | |
---|---|---|
Impersonate ( string domainUser ) : System.Security.Principal.WindowsImpersonationContext |
Impersonates the specified user within the
|
|
Impersonate ( string domainUser, Predicate |
Impersonates the specified user. This method looks for the existing domainUser process running in the system, obtains and duplicates its token, and uses it to impersonate the caller. So it won't work, if the user is logged out or has no processes running. |
Method | Description | |
---|---|---|
DuplicateProcessHandle ( |
Duplicates handle for the process given.
|
public static Impersonate ( string domainUser ) : System.Security.Principal.WindowsImpersonationContext | ||
domainUser | string | The domain user. |
return | System.Security.Principal.WindowsImpersonationContext |
public static Impersonate ( string domainUser, Predicate |
||
domainUser | string | The domain user. |
processFilter | Predicate |
Predicate to find the process suitable for impersonation. If it's |
return | System.Security.Principal.WindowsImpersonationContext |