SecurityUtils.ImpersonateUser

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, 2019 • Updated: 06/23/19
Comment or report problem with topic