ranking Sort Sort   |   date Sort Sort   |   member Sort Sort

Date Submitted Fri. Jan. 26th, 2007 1:54 AM
Revision 1
Scripter i_kenneth
Tags "CSharp" | "impersonation" | "security"
Comments 0 comments
With this simple class you can run som code with others user accounts.
How to use:

// ...some code
using(Impersonator user = new Impersonator("domain", "user", "pswd"))
// This run with new credentials.
// ... more code
This class allows the developer to change the current impersonated user. This is not my code originally, so I cannot take credit for it. I thought it may be useful to someone so I am posting it here.