7
fracturedpsyche
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.
5
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
How to use:
// ...some code
using(Impersonator user = new Impersonator("domain", "user", "pswd"))
{
// This run with new credentials.
}
// ... more code









