WindowsSecurityContext Credentials Property | Apache log4net™ SDK Documentation

Gets or sets the impersonation mode for this security context

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

C#
VB
C++
F#
Copy

    public WindowsSecurityContextImpersonationMode Credentials { get; set; }

    Public Property Credentials As WindowsSecurityContextImpersonationMode
    	Get
    	Set

    public:
    property WindowsSecurityContextImpersonationMode Credentials {
    	WindowsSecurityContextImpersonationMode get ();
    	void set (WindowsSecurityContextImpersonationMode value);
    }

    member Credentials : WindowsSecurityContextImpersonationMode with get, set

#### Property Value

Type: WindowsSecurityContext
ImpersonationMode
The impersonation mode for this security context
Remarks

Impersonate either a user with user credentials or revert this thread to the credentials of the process. The value is one of the WindowsSecurityContext
ImpersonationMode enum.

The default value is User

When the mode is set to User the user's credentials are established using the UserName, DomainName and Password values.

When the mode is set to Process no other properties need to be set. If the calling thread is impersonating then it will be reverted back to the process credentials.

See Also

#### Reference

WindowsSecurityContext Class
log4net.Util Namespace