ServerManager Class
Provides read and write access to the IIS 7 configuration system.
Assembly: Microsoft.Web.Administration (in Microsoft.Web.Administration.dll)
| Name | Description | |
|---|---|---|
![]() | ServerManager() | Initializes a new instance of the ServerManager class by using the default path of the ApplicationHost.config file. |
| Name | Description | |
|---|---|---|
![]() | ApplicationDefaults | Gets an object that defines the default values for applications that are configured on the current server. |
![]() | ApplicationPoolDefaults | Gets an object that defines the default values for application pools that are configured on the current server. |
![]() | ApplicationPools | Gets a collection of application pools on the current server. |
![]() | SiteDefaults | Gets an object that defines the default values for sites that are configured on the current server. |
![]() | Sites | Gets the collection of Web sites that are configured on the current server. |
![]() | VirtualDirectoryDefaults | Gets an object that defines the default values for all virtual directories that are configured on the current server. |
![]() | WorkerProcesses | Gets a collection of worker processes on the current server. |
| Name | Description | |
|---|---|---|
![]() | CommitChanges() | Commits changes to the IIS 7 configuration system. |
![]() | Dispose() | Releases all resources used by the ServerManager class. |
![]() | Equals(Object) | (Inherited from Object.) |
![]() | GetAdministrationConfiguration() | Returns a Configuration object for the default Administration.config file. |
![]() | GetAdministrationConfiguration(WebConfigurationMap, String) | Returns a Configuration object for the Administration.config file by using the specified WebConfigurationMap object and configuration file path. |
![]() | GetApplicationHostConfiguration() | Returns a Configuration object for the default ApplicationHost.config file. |
![]() | GetHashCode() | (Inherited from Object.) |
![]() | GetMetadata(String) | Returns metadata values from the server manager. |
![]() | GetRedirectionConfiguration() | Returns the configuration from the configuration manager. |
![]() | GetType() | (Inherited from Object.) |
![]() | GetWebConfiguration(String) | Returns a Configuration object for a Web.config file by using the specified Web site name. |
![]() | GetWebConfiguration(String, String) | Returns a Configuration object for a Web.config file by using the specified Web site name and virtual path. |
![]() | GetWebConfiguration(WebConfigurationMap, String) | Returns a Configuration object for a Web.config file by using the specified WebConfigurationMap object and configuration file path. |
![]() ![]() | OpenRemote(String) | Creates a ServerManager object that is connected to a remote system. |
![]() | SetMetadata(String, Object) | Adds or changes the metadata for the current server manager. |
![]() | ToString() | (Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() ![]() | IDisposable.Dispose() | Releases the unmanaged resources used by the ServerManager. |
The ServerManager object is the top-level configuration object. You can access the Application collection, Site collection, WorkerProcess collections, Binding objects, and VirtualDirectory collections from the ServerManager. The properties that the ServerManager class exposes are read-only. However, the objects that the properties of this class return provide both read and write access. Updates made to configuration objects must be explicitly written to the configuration system by using the CommitChanges method.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.




