Logs on a user and changes the current process impersonation to that user.
IMPORTANT: Returns a WindowsImpersonationContext and you have to either dispose this instance or call RevertImpersonation with it.
public static WindowsImpersonationContext ImpersonateUser(string username, string password, string domain)
Return Value
WindowsImpersonation Context. Call RevertImpersonation() to clear the impersonation or Dispose() instance.
Parameters
username
password
domain
Remarks
Requires Full Trust permissions in ASP.NET Web Applications.
See also:
Class SecurityUtils© West Wind Technologies, 1996-2016 • Updated: 12/12/15
Comment or report problem with topic