ServerManagementUnit Class
IIS 7.0
Encapsulates contextual information about the server being managed.
System..::..Object
Microsoft.Web.Management.Server..::..ManagementUnit
Microsoft.Web.Management.Server..::..ServerManagementUnit
Microsoft.Web.Management.Server..::..ManagementUnit
Microsoft.Web.Management.Server..::..ServerManagementUnit
Assembly: Microsoft.Web.Management (in Microsoft.Web.Management.dll)
The ServerManagementUnit type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | 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. (Overrides ManagementUnit..::..Scope.) |
![]() | ServerManager | Gets the server manager for the management unit. (Inherited from ManagementUnit.) |
| Name | Description | |
|---|---|---|
![]() | CreateConfigurationMap | 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.) |
![]() | Equals | (Inherited from Object.) |
![]() | Finalize | (Inherited from Object.) |
![]() | GetApplication | 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.) |
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetModuleProviders | Returns a collection of module providers of the specified type. (Inherited from ManagementUnit.) |
![]() | GetModuleService | Retrieves the ModuleService object that corresponds to the specified module name. (Inherited from ManagementUnit.) |
![]() | GetSite | Returns a site management unit for the specified site name. |
![]() | GetType | (Inherited from Object.) |
![]() | 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. (Overrides ManagementUnit..::..GetTypeInformation(String, Boolean, Type).) |
![]() | MemberwiseClone | (Inherited from Object.) |
![]() | ToString | (Inherited from Object.) |
![]() | Update | Commits changes on the ManagementUnit. (Inherited from ManagementUnit.) |
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 ModuleProvider..::..ManagementUnit property.
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(); } }
