指定 ASP.NET 應用程式是否應以應用程式集區身分識別執行, (預設) 、IIS 驗證的使用者身分識別或自訂設定的身分識別。
Syntax
class IdentitySection : ConfigurationSection
方法
下表列出 類別所 IdentitySection 公開的方法。
| 名稱 | 描述 |
|---|---|
| GetAllowDefinition | (繼承自 ConfigurationSection.) |
| GetAllowLocation | (繼承自 ConfigurationSection。) |
| RevertToParent | (繼承自 ConfigurationSection。) |
| SetAllowDefinition | (繼承自 ConfigurationSection。) |
| SetAllowLocation | (繼承自 ConfigurationSection。) |
屬性
下表列出 類別所 IdentitySection 公開的屬性。
| 名稱 | 描述 |
|---|---|
Impersonate |
必要的讀取/寫入 boolean 值。 true 如果用戶端模擬用於每個要求,則為 ;否則為 false 。 預設值為 false。 |
Location |
(繼承自 ConfigurationSection .) 金鑰屬性。 |
Password |
選擇性的讀取/寫入 string 值,如果 屬性設定 true 為 , Impersonate 則會指定 Web 應用程式的密碼。 如需詳細資訊,請參閱<備註>一節。 |
Path |
(繼承自 ConfigurationSection .) 金鑰屬性。 |
SectionInformation |
(繼承自 ConfigurationSection。) |
UserName |
選擇性的讀取/寫入 string 值,如果 屬性設定 true 為 , Impersonate 則會指定 Web 應用程式的使用者名稱。 如需詳細資訊,請參閱<備註>一節。 |
子類別
這個類別不包含子類別。
備註
Password和 UserName 屬性會以純文字形式儲存在組態檔中。 雖然 IIS 不會傳輸.config檔案以回應使用者代理程式要求,但包含伺服器之網域上具有適當認證的使用者可以讀取.config檔案。 如需在登錄中以加密形式儲存 UserName 和 Password 值的相關資訊,請參閱 identity Element (ASP.NET Settings Schema) 。
繼承階層架構
IdentitySection
規格需求
| 類型 | 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 |