Export (0) Print
Expand All
1 out of 4 rated this helpful - Rate this topic

ServerManager Class

IIS 7.0

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

System..::..Object
  Microsoft.Web.Administration..::..ServerManager

Namespace:  Microsoft.Web.Administration
Assembly:  Microsoft.Web.Administration (in Microsoft.Web.Administration.dll)
public sealed class ServerManager : IDisposable

The ServerManager type exposes the following members.

  NameDescription
Public methodServerManager()()()()Initializes a new instance of the ServerManager class by using the default path of the ApplicationHost.config file.
Public methodServerManager(String)This API supports the iisver Framework infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.
Public methodServerManager(Boolean, String)This API supports the iisver Framework infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.
Top
  NameDescription
Public propertyApplicationDefaultsGets an object that defines the default values for applications that are configured on the current server.
Public propertyApplicationPoolDefaultsGets an object that defines the default values for application pools that are configured on the current server.
Public propertyApplicationPoolsGets a collection of application pools on the current server.
Public propertySiteDefaultsGets an object that defines the default values for sites that are configured on the current server.
Public propertySitesGets the collection of Web sites that are configured on the current server.
Public propertyVirtualDirectoryDefaultsGets an object that defines the default values for all virtual directories that are configured on the current server.
Public propertyWorkerProcessesGets a collection of worker processes on the current server.
Top
  NameDescription
Public methodCommitChangesCommits changes to the IIS 7 configuration system.
Public methodDisposeReleases all resources used by the ServerManager class.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetAdministrationConfiguration()()()()Returns a Configuration object for the default Administration.config file.
Public methodGetAdministrationConfiguration(WebConfigurationMap, String)Returns a Configuration object for the Administration.config file by using the specified WebConfigurationMap object and configuration file path.
Public methodGetApplicationHostConfigurationReturns a Configuration object for the default ApplicationHost.config file.
Public methodGetHashCode (Inherited from Object.)
Public methodGetMetadataReturns metadata values from the server manager.
Public methodGetRedirectionConfigurationReturns the configuration from the configuration manager.
Public methodGetType (Inherited from Object.)
Public methodGetWebConfiguration(String)Returns a Configuration object for a Web.config file by using the specified Web site name.
Public methodGetWebConfiguration(String, String)Returns a Configuration object for a Web.config file by using the specified Web site name and virtual path.
Public methodGetWebConfiguration(WebConfigurationMap, String)Returns a Configuration object for a Web.config file by using the specified WebConfigurationMap object and configuration file path.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodStatic memberOpenRemoteCreates a ServerManager object that is connected to a remote system.
Public methodSetMetadataAdds or changes the metadata for the current server manager.
Public methodToString (Inherited from Object.)
Top
  NameDescription
Explicit interface implemetationPrivate methodIDisposable..::..DisposeReleases the unmanaged resources used by the ServerManager.
Top

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.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.