log4net SDK Reference

WindowsSecurityContext.Impersonate Method 

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

[Visual Basic]
Overrides Public Function Impersonate( _
   ByVal state As Object _
) As IDisposable
[C#]
public override IDisposable Impersonate(
   object state
);

Parameters

state
caller provided state

Return Value

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

WindowsSecurityContext Class | log4net.Util Namespace