WindowsSecurityContext Impersonate Method | Apache log4net™ SDK Documentation

Impersonate the Windows account specified by the UserName and DomainName properties.

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

C#
VB
C++
F#
Copy

    public override IDisposable Impersonate(
    	Object state
    )

    Public Overrides Function Impersonate (
    	state As Object
    ) As IDisposable

    public:
    virtual IDisposable^ Impersonate(
    	Object^ state
    ) override

    abstract Impersonate :
            state : Object -> IDisposable
    override Impersonate :
            state : Object -> IDisposable

#### Parameters

state
  Type: System
  Object
  caller provided state

#### Return Value

Type: IDisposable
An IDisposable instance that will revoke the impersonation of this SecurityContext
Remarks

Depending on the Credentials property either impersonate a user using credentials supplied or revert to the process credentials.

See Also

#### Reference

WindowsSecurityContext Class
log4net.Util Namespace