WindowsSecurityContext ActivateOptions Method | Apache log4net™ SDK Documentation

Initialize the SecurityContext based on the options set.

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

C#
VB
C++
F#
Copy

    public void ActivateOptions()

    Public Sub ActivateOptions

    public:
    virtual void ActivateOptions() sealed

    abstract ActivateOptions : unit -> unit
    override ActivateOptions : unit -> unit

#### Implements

IOptionHandler
ActivateOptions
Exceptions

Exception | Condition
--- | ---
ArgumentNullException | The required UserName, DomainName or Password properties were not specified.

Remarks

This is part of the IOptionHandler delayed object activation scheme. The ActivateOptions
method must be called on this object after the configuration properties have been set. Until ActivateOptions
is called this object is in an undefined state and must not be used.

If any of the configuration properties are modified then ActivateOptions
must be called again.

The security context will try to Logon the specified user account and capture a primary token for impersonation.

See Also

#### Reference

WindowsSecurityContext Class
log4net.Util Namespace