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
ServerManager
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()

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

ServerManager(Boolean, String)
ServerManager(String)

Properties

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.

Methods

CommitChanges()

Commits changes to the IIS 7 configuration system.

Dispose()

Releases all resources used by the ServerManager class.

Finalize()
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.

GetMetadata(String)

Returns metadata values from the server manager.

GetRedirectionConfiguration()

Returns the configuration from the configuration manager.

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.

Explicit Interface Implementations

IDisposable.Dispose()

Releases the unmanaged resources used by the ServerManager.

Applies to