Gets or sets the impersonation mode for this security context
The impersonation mode for this security context
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.
WindowsSecurityContext Class | log4net.Util Namespace