定義安全性原則檔案與其信任層級名稱之間的對應集合。
Syntax
class SecurityPolicySection : ConfigurationSectionWithCollection
方法
下表列出 類別所 SecurityPolicySection 公開的方法。
| 名稱 | 描述 |
|---|---|
| 加入 | (繼承自 ConfigurationSectionWithCollection.) |
| 清除 | (繼承自 ConfigurationSectionWithCollection。) |
| Get | (繼承自 ConfigurationSectionWithCollection。) |
| GetAllowDefinition | (繼承自 ConfigurationSection.) |
| GetAllowLocation | (繼承自 ConfigurationSection。) |
| 移除 | (繼承自 ConfigurationSectionWithCollection。) |
| RevertToParent | (繼承自 ConfigurationSection。) |
| SetAllowDefinition | (繼承自 ConfigurationSection。) |
| SetAllowLocation | (繼承自 ConfigurationSection。) |
屬性
下表列出 類別所 SecurityPolicySection 公開的屬性。
| 名稱 | 描述 |
|---|---|
Location |
(繼承自 ConfigurationSection .) 索引鍵屬性。 |
Path |
(繼承自 ConfigurationSection .) 索引鍵屬性。 |
SectionInformation |
(繼承自 ConfigurationSection。) |
SecurityPolicy |
讀取/寫入 TrustLevel 值的陣列,會將安全性原則檔案對應至具名安全性信任層級。 您可以在TrustSection類別的 屬性中 Level 指定信任層級名稱,將安全性原則套用至 ASP.NET 應用程式。 |
子類別
這個類別不包含子類別。
備註
這個類別只有在月臺層級設定 (Web.config) 檔案中才有效。
如需 ASP.NET 和原則檔案的詳細資訊,請參閱 ASP.NET 信任層級和原則檔案 和管理 安全性原則。
繼承階層架構
ConfigurationSectionWithCollection
SecurityPolicySection
規格需求
| 類型 | 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 |
另請參閱
ConfigurationSectionWithCollection 類別
TrustLevel 類別
TrustSection 類別
ASP.NET Trust Levels and Policy Files
管理安全性原則