ModuleService.Context Property

Definition

Gets the management context of the module service.

public:
 property Microsoft::Web::Management::Server::IManagementContext ^ Context { Microsoft::Web::Management::Server::IManagementContext ^ get(); };
public Microsoft.Web.Management.Server.IManagementContext Context { get; }
member this.Context : Microsoft.Web.Management.Server.IManagementContext
Public ReadOnly Property Context As IManagementContext

Property Value

An IManagementContext interface.

Examples

The following example uses the Context property to get information about the client and current user, and then it writes the information to the tracing output.

public void TraceContext() {

    Trace.WriteLine("Context.ClientClrVersion : " + Context.ClientClrVersion +
        "\n IsLocalConnection " + Context.IsLocalConnection.ToString() +
        "\n User.Identity.AuthenticationType " +
        Context.User.Identity.AuthenticationType.ToString() +
        "\n User.IsInRole(Administrator) " +
        Context.User.IsInRole(WindowsBuiltInRole.Administrator.ToString()).ToString());
}

Applies to