共用方式為


ConfigurationSection Class1

做為代表組態區段之類別的基類。

Syntax

class ConfigurationSection  

方法

下表列出 類別所 ConfigurationSection 公開的方法。

名稱 描述
GetAllowDefinition allowDefinition 取組態區段的屬性。
GetAllowLocation allowLocation 取組態區段的屬性。
RevertToParent 將區段中的組態值還原為其父區段的組態值。
SetAllowDefinition allowDefinition設定組態區段的屬性。
SetAllowLocation allowLocation設定組態區段的屬性。

屬性

下表列出 類別所 ConfigurationSection 公開的屬性。

名稱 描述
Location 唯讀 string 值,其中包含相對於目前 物件的目標物件路徑。 例如,在物件路徑 「MACHINE/WEBROOT/APPHOST/MYSITE/APP/」 中, Location 屬性會包含 「MYSITE/APP/」。 索引鍵屬性。
Path 唯讀 string 值,其中包含目前 物件的路徑。 例如,在物件路徑 「MACHINE/WEBROOT/APPHOST/MYSITE/APP/」 中, Path 屬性會包含 「MACHINE/WEBROOT/APPHOST/」。 索引鍵屬性。
SectionInformation SectionInformation物件,其讀取/寫入屬性會提供組態區段的中繼資料和控制鎖定。

子類別

下表列出 類別所公開的 ConfigurationSection 子類別。

名稱 描述
AccessSection 指定安全通訊端層保護之內容的存取權限, (SSL) 。
AnonymousAuthenticationSection 設定匿名驗證。
AnonymousIdentificationSection 指定 Cookie 在 Web 應用程式中的使用方式。
AspSection 公開 ASP 應用程式的 ACTIVE Server Pages (ASP) 組態設定。
BasicAuthenticationSection 設定基本驗證。
CacheSection 定義 ASP.NET Web 應用程式的快取設定。
CgiSection 設定 CGI) 設定 (通用閘道介面。
ClientCertificateMappingAuthenticationSection 啟用或停用用戶端憑證對應驗證。
ConfigurationHistorySection 設定 ApplicationHost Helper 服務的組態歷程記錄設定。
ConfigurationRedirectionSection 設定ApplicationHost.config和Administration.config檔案的位置。
ConfigurationSectionWithCollection 做為包含集合之組態區段類別的基類。
DateTimeSerializationSection 處理 System.DateTime 實例 XML 序列化的組態設定。
DigestAuthenticationSection 設定摘要式驗證。
DirectoryBrowseSection 在 IIS 中設定瀏覽目錄。
GlobalizationSection 設定 Web 應用程式的全球化設定。
HostingEnvironmentSection 定義組態設定以控制應用程式裝載環境的行為。
HttpCookiesSection 設定 Web 應用程式使用之 Cookie 的屬性。
HttpLoggingSection 設定 HTTP 要求的記錄。
HttpRuntimeSection 設定 ASP.NET HTTP 執行時間設定,以決定指定 ASP.NET 應用程式的要求處理方式。
IdentitySection 指定 ASP.NET 應用程式是否應該以應用程式集區身分識別的形式執行, (預設) 、IIS 驗證的使用者身分識別或自訂設定的身分識別。
LogSection 設定伺服器或月臺的記錄。
MachineKeySection 定義組態設定,以控制用於加密、解密和媒體存取控制的金鑰產生和演算法, (MAC) 表單驗證、檢視狀態驗證和會話狀態應用程式隔離中的作業。
OdbcLoggingSection 指定透過 OPEN Database Connectivity (ODBC) 連線,將 IIS 事件記錄至資料庫的組態設定。
OutputCacheSection 指定 ASP.NET 應用程式的輸出快取設定。
ProcessModelSection 在執行 IIS 的 Web 服務器上設定 ASP.NET 進程模型設定。
RequestCachingSection 包含要求快取的組態資訊。
ServerRuntimeSection 設定 Web 服務器上的應用程式要求限制。
ServerSideIncludeSection 設定伺服器端包含 (SSI) 指示詞。
SessionPageStateSection 設定 ASP.NET 應用程式的頁面檢視狀態設定。
SettingsSection 包含會指定 .NET Framework 如何連接至網路的設定。
SmtpMailSettingsSection 包含簡單郵件傳輸通訊協定 (SMTP) 組態設定。
SystemWebDeploymentSection 定義支援部署 Web 應用程式的組態設定。
SystemWindowsFormsSection 儲存Windows Forms應用程式的應用程式設定。
TraceSection 設定 ASP.NET 程式碼追蹤服務。
TransactionsDefaultSettingsSection 包含交易的預設設定。
TransactionsMachineSettingsSection 表示組態檔中的 XML 區段,其中包含只能在電腦層級修改的設定。
TrustSection 設定套用至應用程式的程式碼存取安全性層級。
UrlCompressionSection 啟用或停用動態或靜態壓縮。
ValidationSection 啟用或停用組態檔的驗證檢查。
WebControlsSection 指定用戶端腳本檔案的共用位置。
WebLimitsSection 指定 Web 服務器的用戶端流量限制。
XhtmlConformanceSection 指定 ASP.NET 應用程式的 XHTML 轉譯模式。
XmlSerializerSection 處理用於設定 XML 序列化的 XML 項目。

備註

衍生自 ObjectConfigurationAssociation 類別的關聯類別會 ConfigurationSection 使用 類別,將物件連結至組態區段。

衍生自 ConfigurationSection 的所有類別都會繼承 LocationPathSectionInformation 屬性。 LocationPath 是 的所有子類別的 ConfigurationSection 索引鍵屬性。

規格需求

類型 Description
Client - Windows Vista 上的 IIS 7.0
- Windows 7 上的 IIS 7.5
- Windows 8上的 IIS 8.0
- Windows 10上的 IIS 10.0
伺服器 - Windows Server 2008 上的 IIS 7.0
- Windows Server 2008 R2 上的 IIS 7.5
- Windows Server 2012上的 IIS 8.0
- Windows Server 2012 R2 上的 IIS 8.5
- Windows Server 2016上的 IIS 10.0
產品 - IIS 7.0、IIS 7.5、IIS 8.0、IIS 8.5、IIS 10.0
MOF 檔案 WebAdministration.mof

另請參閱

WMI 提供者
ConfigurationSectionWithCollection 類別
ObjectConfigurationAssociation 類別
SectionInformation 類別