ServerManager ServerManager ServerManager ServerManager Class

Definition

Provides read and write access to the IIS 7 configuration system.

public ref class ServerManager sealed : IDisposable
public sealed class ServerManager : IDisposable
type ServerManager = class
    interface IDisposable
Public NotInheritable Class ServerManager
Implements IDisposable
Inheritance
ServerManagerServerManagerServerManagerServerManager
Implements

Remarks

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.

Constructors

ServerManager() ServerManager() ServerManager() ServerManager()

Initializes a new instance of the ServerManager class by using the default path of the ApplicationHost.config file.

ServerManager(String) ServerManager(String) ServerManager(String) ServerManager(String)
ServerManager(Boolean, String) ServerManager(Boolean, String) ServerManager(Boolean, String) ServerManager(Boolean, String)

Properties

ApplicationDefaults ApplicationDefaults ApplicationDefaults ApplicationDefaults

Gets an object that defines the default values for applications that are configured on the current server.

ApplicationPoolDefaults ApplicationPoolDefaults ApplicationPoolDefaults ApplicationPoolDefaults

Gets an object that defines the default values for application pools that are configured on the current server.

ApplicationPools ApplicationPools ApplicationPools ApplicationPools

Gets a collection of application pools on the current server.

SiteDefaults SiteDefaults SiteDefaults SiteDefaults

Gets an object that defines the default values for sites that are configured on the current server.

Sites Sites Sites Sites

Gets the collection of Web sites that are configured on the current server.

VirtualDirectoryDefaults VirtualDirectoryDefaults VirtualDirectoryDefaults VirtualDirectoryDefaults

Gets an object that defines the default values for all virtual directories that are configured on the current server.

WorkerProcesses WorkerProcesses WorkerProcesses WorkerProcesses

Gets a collection of worker processes on the current server.

Methods

CommitChanges() CommitChanges() CommitChanges() CommitChanges()

Commits changes to the IIS 7 configuration system.

Dispose() Dispose() Dispose() Dispose()

Releases all resources used by the ServerManager class.

Finalize() Finalize() Finalize() Finalize()
GetAdministrationConfiguration() GetAdministrationConfiguration() GetAdministrationConfiguration() GetAdministrationConfiguration()

Returns a Configuration object for the default Administration.config file.

GetAdministrationConfiguration(WebConfigurationMap, String) GetAdministrationConfiguration(WebConfigurationMap, String) GetAdministrationConfiguration(WebConfigurationMap, String) GetAdministrationConfiguration(WebConfigurationMap, String)

Returns a Configuration object for the Administration.config file by using the specified WebConfigurationMap object and configuration file path.

GetApplicationHostConfiguration() GetApplicationHostConfiguration() GetApplicationHostConfiguration() GetApplicationHostConfiguration()

Returns a Configuration object for the default ApplicationHost.config file.

GetMetadata(String) GetMetadata(String) GetMetadata(String) GetMetadata(String)

Returns metadata values from the server manager.

GetRedirectionConfiguration() GetRedirectionConfiguration() GetRedirectionConfiguration() GetRedirectionConfiguration()

Returns the configuration from the configuration manager.

GetWebConfiguration(String) GetWebConfiguration(String) GetWebConfiguration(String) GetWebConfiguration(String)

Returns a Configuration object for a Web.config file by using the specified Web site name.

GetWebConfiguration(WebConfigurationMap, String) GetWebConfiguration(WebConfigurationMap, String) GetWebConfiguration(WebConfigurationMap, String) GetWebConfiguration(WebConfigurationMap, String)

Returns a Configuration object for a Web.config file by using the specified WebConfigurationMap object and configuration file path.

GetWebConfiguration(String, String) GetWebConfiguration(String, String) GetWebConfiguration(String, String) GetWebConfiguration(String, String)

Returns a Configuration object for a Web.config file by using the specified Web site name and virtual path.

OpenRemote(String) OpenRemote(String) OpenRemote(String) OpenRemote(String)

Creates a ServerManager object that is connected to a remote system.

SetMetadata(String, Object) SetMetadata(String, Object) SetMetadata(String, Object) SetMetadata(String, Object)

Adds or changes the metadata for the current server manager.

Explicit Interface Implementations

IDisposable.Dispose() IDisposable.Dispose() IDisposable.Dispose() IDisposable.Dispose()

Releases the unmanaged resources used by the ServerManager.

Applies to