<user> 項目
允許定義組態檔中的使用者名稱和密碼憑證。
<configuration>
<system.web>
<authentication>
<credentials>
<user>
<user name="username" password="password"/>
必要屬性
屬性 | 說明 |
---|---|
name | 登入使用者名稱。 |
password | 使用者的密碼。 |
範例
下列範例設定密碼格式並提供使用者名稱和密碼。
<authentication mode="Windows">
<credentials passwordFormat="SHA1">
<user name="UserName"
password="07B7F3EE06F278DB966BE960E7CBBD103DF30CA6"/>
</credentials>
</authentication>
需求
包含於:<system.web>
**Web 平台:**IIS 5.0、IIS 5.1、IIS 6.0
**組態檔:**Machine.config, Web.config
**組態區段處理常式:**System.Web.Configuration.AuthenticationConfigHandler
請參閱
<authentication> 項目 | <credentials> 項目 | 使用 ASP.NET 和 XML Web Service 用戶端建立的 XML Web Service | ASP.NET 組態 | ASP.NET 設定結構描述