C# (CSharp) Tools Impersonator - 2 Beispiele gefunden. Dies sind die am besten bewerteten C# (CSharp) Beispiele für die Tools.Impersonator, die aus Open Source-Projekten extrahiert wurden. Sie können Beispiele bewerten, um die Qualität der Beispiele zu verbessern.
Impersonation of a user. Allows to execute code under another user context. Please note that the account that instantiates the Impersonator class needs to have the 'Act as part of operating system' privilege set.
This class is based on the information in the Microsoft knowledge base article http://support.microsoft.com/default.aspx?scid=kb;en-us;Q306158 Encapsulate an instance into a using-directive like e.g.: ... using ( new Impersonator( "myUsername", "myDomainname", "myPassword" ) ) { ... [code that executes under the new context] ... } ... Please contact the author Uwe Keim (mailto:[email protected]) for questions regarding this class.