ServerManagementUnit Class

Definition

Encapsulates contextual information about the server being managed.

public ref class ServerManagementUnit sealed : Microsoft::Web::Management::Server::ManagementUnit
public sealed class ServerManagementUnit : Microsoft.Web.Management.Server.ManagementUnit
type ServerManagementUnit = class
    inherit ManagementUnit
Public NotInheritable Class ServerManagementUnit
Inherits ManagementUnit
Inheritance
ServerManagementUnit

Examples

The following example sends ServerManagementUnit information to the trace listener.

void traceMU() {

    ServerManagementUnit smu = ManagementUnit as ServerManagementUnit;

    if (smu != null) {
        string FMV = smu.FrameworkVersions.ToString();
        Trace.WriteLine("FrameworkVersions = " + FMV);
        Trace.WriteLine("MachineName = " + smu.MachineName);
        ApplicationManagementUnit amu =
            smu.GetApplication("rickaSite", "/ra");
        Trace.WriteLine("App FrameworkVersion = "
            + amu.FrameworkVersion.Text);
        SiteManagementUnit rickaSMU = smu.GetSite("rickaSite");
        string rwcp = rickaSMU.ConfigurationMap.RootWebConfigurationPath;
        Trace.WriteLine("RootWebConfigurationPath = " + rwcp);
        ManagementScope ms = smu.Scope;
        Trace.WriteLine("Scope = " + ms.ToString());


    } else {

        ApplicationManagementUnit appUnit = 
            ManagementUnit as ApplicationManagementUnit;
        if (appUnit != null)
            traceAppUnit();
    }

} 

Remarks

The ServerManagementUnit class accesses configuration information at the root level (the ApplicationHost.config or root Web.config file). For more information, see the SiteManagementUnit and ApplicationManagementUnit classes. You cannot create a ServerManagementUnit object directly; you can get one only from the Microsoft.Web.Management.Server.ModuleProvider.ManagementUnit property.

Properties

Administration

Gets the current management administration configuration.

(Inherited from ManagementUnit)
Configuration

Gets configuration information for the current management unit.

(Inherited from ManagementUnit)
ConfigurationMap

Gets the configuration map for the management unit.

(Inherited from ManagementUnit)
ConfigurationPath

Gets the configuration path information for the current management unit.

(Inherited from ManagementUnit)
Context

Gets management context information for the current management unit.

(Inherited from ManagementUnit)
FrameworkVersion

Gets the .NET Framework version for the current management unit.

(Inherited from ManagementUnit)
FrameworkVersions

Gets the installed .NET Framework versions for the current management unit context.

IsUserServerAdministrator

Gets a value indicating whether the calling user is a server administrator.

(Inherited from ManagementUnit)
MachineName

Gets the computer name of the server.

Scope

Gets the scope of the server management unit.

ServerManager

Gets the server manager for the management unit.

(Inherited from ManagementUnit)

Methods

CreateConfigurationMap(Boolean)

When overridden in a derived class, creates a file map that contains global configuration information that is applicable to this management unit.

(Inherited from ManagementUnit)
GetApplication(String, String)

Returns an application management unit for the specified site name and application path.

GetAssociatedFrameworkVersion()

When overridden in a derived class, returns the .NET Framework version for the management unit.

(Inherited from ManagementUnit)
GetModuleProviders(Type)

Returns a collection of module providers of the specified type.

(Inherited from ManagementUnit)
GetModuleService(String)

Retrieves the ModuleService object that corresponds to the specified module name.

(Inherited from ManagementUnit)
GetSite(String)

Returns a site management unit for the specified site name.

GetTypeInformation(String)

When the GetTypeInformation(String, Boolean, Type) method is overridden in a derived class, retrieves the assembly-qualified type names for all types in the current management scope that derive from the specified base type name.

(Inherited from ManagementUnit)
GetTypeInformation(String, Boolean)

When the GetTypeInformation(String, Boolean, Type) method is overridden in a derived class, retrieves the assembly-qualified type names for all types in the current management scope that derive from the specified base type name, optionally including types that are not public.

(Inherited from ManagementUnit)
GetTypeInformation(String, Boolean, Type)

Returns public type information for the specified base type name and generator type, and optionally includes non-public types.

Update()

Commits changes on the ManagementUnit.

(Inherited from ManagementUnit)

Applies to