ServerManager 類別

定義

提供 IIS 7 組態系統的讀取和寫入存取權。

public ref class ServerManager sealed : IDisposable
public sealed class ServerManager : IDisposable
type ServerManager = class
    interface IDisposable
Public NotInheritable Class ServerManager
Implements IDisposable
繼承
ServerManager
實作

備註

物件 ServerManager 是最上層組態物件。 您可以從 存取 Application 集合、 Site 集合、 WorkerProcess 集合 Binding 、物件和 VirtualDirectory 集合 ServerManager 。 類別公開的屬性 ServerManager 是唯讀的。 不過,這個類別的屬性傳回的物件會同時提供讀取和寫入存取權。 更新設定物件時,必須使用 方法來明確寫入組態系統 CommitChanges

建構函式

ServerManager()

使用ApplicationHost.config檔案的預設路徑,初始化 類別的新實例 ServerManager

ServerManager(Boolean, String)

提供 IIS 7 組態系統的讀取和寫入存取權。

ServerManager(String)

提供 IIS 7 組態系統的讀取和寫入存取權。

屬性

ApplicationDefaults

取得 物件,這個物件會定義目前伺服器上所設定之應用程式的預設值。

ApplicationPoolDefaults

取得 物件,這個物件會定義目前伺服器上所設定之應用程式集區的預設值。

ApplicationPools

取得目前伺服器上的應用程式集區集合。

SiteDefaults

取得 物件,這個物件會定義目前伺服器上所設定之月臺的預設值。

Sites

取得目前伺服器上設定的網站集合。

VirtualDirectoryDefaults

取得 物件,這個物件會定義目前伺服器上設定之所有虛擬目錄的預設值。

WorkerProcesses

取得目前伺服器上的背景工作進程集合。

方法

CommitChanges()

認可 IIS 7 組態系統的變更。

Dispose()

釋放 ServerManager 類別所使用的所有資源。

Finalize()

提供 IIS 7 組態系統的讀取和寫入存取權。

GetAdministrationConfiguration()

Configuration傳回預設Administration.config檔案的 物件。

GetAdministrationConfiguration(WebConfigurationMap, String)

Configuration使用指定的 WebConfigurationMap 物件和組態檔路徑,傳回Administration.config檔案的 物件。

GetApplicationHostConfiguration()

Configuration傳回預設ApplicationHost.config檔案的 物件。

GetMetadata(String)

從伺服器管理員傳回中繼資料值。

GetRedirectionConfiguration()

從組態管理員傳回組態。

GetWebConfiguration(String)

Configuration使用指定的網站名稱傳回Web.config檔案的 物件。

GetWebConfiguration(String, String)

Configuration使用指定的網站名稱和虛擬路徑,傳回Web.config檔案的 物件。

GetWebConfiguration(WebConfigurationMap, String)

Configuration使用指定的 WebConfigurationMap 物件和組態檔路徑,傳回Web.config檔案的 物件。

OpenRemote(String)

建立 ServerManager 連接到遠端系統的 物件。

SetMetadata(String, Object)

新增或變更目前伺服器管理員的中繼資料。

明確介面實作

IDisposable.Dispose()

釋放 ServerManager 使用的 Unmanaged 資源。

適用於