Impersonate a Windows Account
Inheritance Hierarchy
log4net.CoreSecurityContext
log4net.UtilWindowsSecurityContext
Namespace: log4net.Util
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax
The WindowsSecurityContext type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() | WindowsSecurityContext |
Default constructor
|
Properties
Name | Description | |
---|---|---|
![]() | Credentials |
Gets or sets the impersonation mode for this security context
|
![]() | DomainName |
Gets or sets the Windows domain name for this security context
|
![]() | Password |
Sets the password for the Windows account specified by the UserName and DomainName properties.
|
![]() | UserName |
Gets or sets the Windows username for this security context
|
Methods
Name | Description | |
---|---|---|
![]() | ActivateOptions |
Initialize the SecurityContext based on the options set.
|
![]() | Equals | (Inherited from Object.) |
![]() | Finalize |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.) |
![]() | GetHashCode |
Serves as a hash function for a particular type.
(Inherited from Object.) |
![]() | GetType |
Gets the Type of the current instance.
(Inherited from Object.) |
![]() | Impersonate |
Impersonate the Windows account specified by the UserName and DomainName properties.
(Overrides SecurityContextImpersonate(Object).) |
![]() | MemberwiseClone |
Creates a shallow copy of the current Object.
(Inherited from Object.) |
![]() | ToString | (Inherited from Object.) |
Remarks
This SecurityContext impersonates a Windows account.
How the impersonation is done depends on the value of Impersonate(Object). This allows the context to either impersonate a set of user credentials specified using username, domain name and password or to revert to the process credentials.
See Also