為使用表單驗證的 Web 應用程式設定使用者認證。
Syntax
class FormsAuthenticationUser : CollectionElement
方法
這個類別不包含方法。
屬性
下表列出 類別所 FormsAuthenticationUser 公開的屬性。
| 名稱 | 描述 |
|---|---|
Name |
唯讀 string 值,其中包含 Web 應用程式所需的登入使用者名稱。 索引鍵屬性。 |
Password |
讀取/寫入 string 值,指定 Web 應用程式所需的使用者密碼。 |
子類別
這個類別不包含子類別。
備註
這個類別的實例包含在 CredentialsFormsAuthenticationCredentials 類別的 屬性中。
FormsAuthenticationUser物件只能在電腦、月臺或應用層級將資訊寫入組態檔的相關區段。 在階層中不同層級的組態檔中寫入的任何嘗試,都會產生剖析器產生的錯誤訊息。 不過,您可以使用這個類別來讀取階層中任何層級的組態資訊。 為了安全與延展性,您應該使用外部存放庫,例如資料庫來保留使用者認證。
繼承階層架構
FormsAuthenticationUser
規格需求
| 類型 | 描述 |
|---|---|
| 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 |
另請參閱
AnonymousAuthenticationSection 類別
AuthenticationSection 類別
BasicAuthenticationSection 類別
ClientCertificateMappingAuthenticationSection 類別
CollectionElement 類別
DigestAuthenticationSection 類別
FormsAuthenticationConfiguration 類別
FormsAuthenticationCredentials 類別
IisClientCertificateMappingAuthenticationSection 類別
PassportAuthentication 類別
WindowsAuthenticationSection 類別