C# 클래스 Aspose.Pdf.Examples.CSharp.AsposePDFFacades.Printing.Impersonator

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.
상속: IDisposable
파일 보기 프로젝트 열기: aspose-pdf/Aspose.Pdf-for-.NET

공개 메소드들

메소드 설명
Dispose ( ) : void
Impersonator ( string userName, string domainName, string password ) : System

Constructor. Starts the impersonation with the given credentials. Please note that the account that instantiates the Impersonator class Needs to have the 'Act as part of operating system' privilege set.

비공개 메소드들

메소드 설명
CloseHandle ( IntPtr handle ) : bool
DuplicateToken ( IntPtr hToken, int impersonationLevel, IntPtr &hNewToken ) : int
ImpersonateValidUser ( string userName, string domain, string password ) : void

Does the actual impersonation.

LogonUser ( string lpszUserName, string lpszDomain, string lpszPassword, int dwLogonType, int dwLogonProvider, IntPtr &phToken ) : int
RevertToSelf ( ) : bool
UndoImpersonation ( ) : void

Reverts the impersonation.

메소드 상세

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

Impersonator() 공개 메소드

Constructor. Starts the impersonation with the given credentials. Please note that the account that instantiates the Impersonator class Needs to have the 'Act as part of operating system' privilege set.
public Impersonator ( string userName, string domainName, string password ) : System
userName string The name of the user to act as.
domainName string The domain name of the user to act as.
password string The password of the user to act as.
리턴 System