WindowsSecurityContext ClassApache log4net™ SDK Documentation
Impersonate a Windows Account
Inheritance Hierarchy

SystemObject
  log4net.CoreSecurityContext
    log4net.UtilWindowsSecurityContext

Namespace: log4net.Util
Assembly: log4net (in log4net.dll) Version: 2.0.6.0-.NET 4.0
Syntax

public class WindowsSecurityContext : SecurityContext, 
	IOptionHandler

The WindowsSecurityContext type exposes the following members.

Constructors

  NameDescription
Public methodWindowsSecurityContext
Default constructor
Top
Properties

  NameDescription
Public propertyCredentials
Gets or sets the impersonation mode for this security context
Public propertyDomainName
Gets or sets the Windows domain name for this security context
Public propertyPassword
Sets the password for the Windows account specified by the UserName and DomainName properties.
Public propertyUserName
Gets or sets the Windows username for this security context
Top
Methods

  NameDescription
Public methodActivateOptions
Initialize the SecurityContext based on the options set.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodImpersonate
Impersonate the Windows account specified by the UserName and DomainName properties.
(Overrides SecurityContextImpersonate(Object).)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
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

Reference