C# Класс Impersonation, code

Provides a mechanism for impersonating a user. This is intended to be disposable, and used in a using ( ) block.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
impersonate ( string userName, string password, string domain, Action action, int logonType = 2, int logonProvider ) : void

impersonates a user based on username/password provided. executed method after impersonation and then reverts impersonation when task/method is complete.

Описание методов

impersonate() публичный статический Метод

impersonates a user based on username/password provided. executed method after impersonation and then reverts impersonation when task/method is complete.
public static impersonate ( string userName, string password, string domain, Action action, int logonType = 2, int logonProvider ) : void
userName string username to impersonate
password string password for user account
domain string domain of user to impersonate
action Action method to invoke after impersonation
logonType int LogonType to use, defaulted to Network
logonProvider int LogonProvider type, defaulted to default
Результат void