做為包含集合之組態區段類別的基類。
Syntax
class ConfigurationSectionWithCollection : ConfigurationSection
方法
下表列出 類別所 ConfigurationSectionWithCollection 公開的方法。
| 名稱 | 描述 |
|---|---|
| 加入 | 將專案加入至組態區段中的集合。 |
| 清除 | 清除組態區段中集合中的所有專案。 |
| Get | 從組態區段擷取集合的指定成員。 |
| GetAllowDefinition | (繼承自 ConfigurationSection.) |
| GetAllowLocation | (繼承自 ConfigurationSection。) |
| 移除 | 從組態區段中的集合中移除指定的專案。 |
| RevertToParent | (繼承自 ConfigurationSection。) |
| SetAllowDefinition | (繼承自 ConfigurationSection。) |
| SetAllowLocation | (繼承自 ConfigurationSection。) |
屬性
下表列出 類別所 ConfigurationSectionWithCollection 公開的屬性。
| 名稱 | 描述 |
|---|---|
Location |
(繼承自 ConfigurationSection .) 索引鍵屬性。 |
Path |
(繼承自 ConfigurationSection .) 索引鍵屬性。 |
SectionInformation |
(繼承自 ConfigurationSection。) |
子類別
下表列出 類別所公開的 ConfigurationSectionWithCollection 子類別。
| 名稱 | 描述 |
|---|---|
| ApplicationDependenciesSection | 公開應用程式相依性資訊。 |
| AppSettingsSection | 包含自訂應用程式設定,例如檔案路徑、XML Web 服務 URL 或儲存在應用程式.ini檔案中的資訊。 |
| AuthenticationModulesSection | 指定使用伺服器執行驗證程式的驗證模組。 |
| AuthenticationSection | 設定 ASP.NET 驗證。 |
| AuthorizationSection | 設定存取 URL 的授權。 |
| CachingSection | 設定輸出和核心快取。 |
| ClientTargetSection | 指定別名與使用者代理程式之間的對應集合。 |
| CompilationSection | 設定 ASP.NET 應用程式的編譯設定。 |
| ConfigProtectedDataSection | 包含受保護的組態提供者資訊。 |
| ConnectionManagementSection | 包含集合,指定 System.Net API 所指定網路主機的連線數目上限。 |
| ConnectionStringsSection | 指定 ASP.NET 應用程式的資料庫連接字串集合。 |
| CustomErrorsSection | 設定 ASP.NET 自訂錯誤訊息。 |
| DefaultDocumentSection | 指定預設提供給用戶端的網頁檔案名。 |
| DefaultProxySection | 設定 Web Proxy 伺服器預設值。 |
| DeviceFiltersSection | 表示決定行動裝置類型或行動瀏覽器功能的裝置篩選集合。 |
| FastCgiSection | 包含 FastCGI 應用程式的組態設定。 |
| GlobalModulesSection | 公開 IIS 全域模組的組態設定。 |
| HandlersSection | 儲存 URL 的處理常式。 |
| HealthMonitoringSection | 設定應用程式以進行健康情況監視。 |
| HttpCompressionSection | 設定 HTTP 壓縮。 |
| HttpErrorsSection | 設定 Web 服務器的 HTTP 錯誤處理。 |
| HttpHandlersSection | 設定 ASP.NET 處理常式的設定。 |
| HttpModulesSection | 包含 ASP.NET 模組。 |
| HttpProtocolSection | 表示 HTTP 通訊協定組態區段。 |
| HttpRedirectSection | 設定 HTTP 重新導向。 |
| HttpTracingSection | 表示 HTTP 追蹤組態區段。 |
| IisClientCertificateMappingAuthenticationSection | 設定 IIS 用戶端憑證的對應。 |
| IPSecuritySection | 根據 IP 位址相關資訊設定 Web 服務器內容的存取權。 |
| IsapiCgiRestrictionSection | 針對以 ISAPI 模式執行的 Web 服務器,設定 ISAPI 和一般閘道介面 (CGI) 限制。 |
| IsapiFiltersSection | 在 Web 服務器上設定 ISAPI 篩選。 |
| ListenerAdaptersSection | 公開接聽程式配接器的集合。 |
| MembershipSection | 驗證使用者認證,並管理使用者設定。 |
| MobileControlsSection | 公開行動控制項、其介面卡和裝置篩選的組態資訊。 |
| ModulesSection | 表示組態檔中的 modules 區段。 |
| OutputCacheSettingsSection | 指定可套用至 ASP.NET 應用程式中頁面的輸出快取設定檔設定。 |
| PagesSection | 表示 <pages> Web.config檔案的 區段。 |
| ProtocolsSection | 包含傳輸通訊協定清單,ASP.NET 可用來解密從 HTTP 要求中的用戶端瀏覽器傳送的資料。 |
| RequestFilteringSection | 設定傳入 URL 要求的掃描。 |
| RoleManagerSection | 定義用於支援 Web 應用程式角色管理基礎結構的組態設定。 |
| SchemaImporterExtensionsSection | 包含將 XML 架構 (XSD) 型別對應至.NET Framework類型的延伸模組集合。 |
| SecurityPolicySection | 定義安全性原則檔案與其信任層級名稱之間的對應集合。 |
| SessionStateSection | 設定 Web 應用程式的工作階段狀態。 |
| SiteMapSection | 定義網站導覽的組態設定。 |
| SqlCacheDependencySection | 代表 System.Web.Caching.SqlCacheDependency |
| StaticContentSection | 公開網站上的靜態內容的組態設定。 |
| SystemCodeDomSection | 指定提供 Code Document Object Model (CodeDOM) 支援的編譯器集合。 |
| SystemDataSection | 指定已安裝 ADO.NET 資料提供者的清單。 |
| SystemDiagnosticsSection | 設定系統診斷和追蹤。 |
| TraceFailedRequestsSection | 表示失敗的要求追蹤組態區段。 |
| TraceProviderDefinitionsSection | 表示定義追蹤提供者的組態區段。 |
| UrlMappingsSection | 表示 <urlMappings> 區段,其中包含一對輸入/輸出 URL 對應。 |
| WebRequestModulesSection | 包含已註冊 Web 要求模組的集合。 |
| WebServicesSection | 控制 XML Web 服務及其用戶端的行為。 |
| WindowsAuthenticationSection | 設定整合式Windows 驗證。 |
備註
如果您變更集合中的索引鍵屬性,則集合中屬性的位置順序 (和索引) 可能會變更。 根據屬性的值 mergeAppend ,變更的索引鍵屬性會新增至集合的開頭或結尾。
注意
屬性 mergeAppend 位於對應至類別屬性之 區段中的適當架構檔案中。 mergeAppend如果 屬性為 false ,則會將新專案新增至集合的開頭;如果 mergeAppend 屬性為 true ,則會將新專案加入至集合的結尾。
在索引鍵屬性值變更之後,您應該小心存取集合中的索引鍵屬性。 例如,如果您變更索引為 4 的索引鍵屬性值,如果 mergeAppend 屬性為 ,則索引鍵屬性的新索引會是 false 0。
注意
當您建立任何自訂架構和自訂群組態檔時,應該注意此行為。 您不應該修改 mergeAppend 隨附于 IIS 7 的架構檔案中的屬性。 您無法使用 IIS 7 的 WMI 提供者來修改 mergeAppend 屬性。
屬性 mergeAppend 會影響隨附于 IIS 7 的下列 ConfigurationSectionWithCollection 類別屬性。 資料表會列出這些屬性及其對應的架構檔案。 在這些情況下,隨附于 IIS 7 的架構檔案會針對 屬性指定 falsemergeAppend 。
| 類別 | 屬性 | 架構檔案 |
|---|---|---|
| AuthorizationSection | Authorization |
ASPNET_Schema.xml |
| CachingSection | Profiles.Profiles |
IIS_Schema.xml |
| DefaultDocumentSection | Files.Files |
IIS_Schema.xml |
| HandlersSection | Handlers |
IIS_Schema.xml |
| HttpHandlersSection | HttpHandlers |
ASPNET_Schema.xml |
繼承階層架構
ConfigurationSectionWithCollection
規格需求
| 類型 | 描述 |
|---|---|
| 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 |
另請參閱
AuthorizationRule 類別
AuthorizationSection 類別
CachingProfileElement 類別
CachingProfileSettings 類別
CachingSection 類別
ConfigurationSection 類別
DefaultDocumentSection 類別
FileSettings 類別
HandlerAction 類別
HandlersSection 類別
HttpHandlerAction 類別
HttpHandlersSection 類別
StringElement 類別