為應用程式新增一個認證模組。
<組態>
<system.net>
<認證模組>
<加>
語法
<add
type="type_fullname, assembly_fullname"
/>
屬性和項目
下列章節說明屬性、子元素和父元素。
Attributes
| Attribute | 說明 |
|---|---|
type |
完全限定型別名稱(由 FullName 屬性表示)與組合名稱(由 FullName 屬性表示),並以逗號分隔。 |
子元素
沒有。
父項目
| 元素 | 說明 |
|---|---|
| 認證模組 | 規範用於驗證網路請求的模組。 |
備註
該 add 元件會在註冊認證模組清單的末端新增一個認證模組。 認證模組依加入清單的順序被呼叫。
屬性的值 type 應該是有效的型別名稱和對應的組合名稱,中間要用逗號分隔。
組態檔
此元素可用於應用程式設定檔或機器設定檔(Machine.config)。
Example
以下範例啟用預設的認證模組。 你應該把 Version 和 PublicKeyToken 的值替換成指定模組的正確值。
<configuration>
<system.net>
<authenticationModules>
<add type="System.Net.DigestClient, System, Version=2.0.3600.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add type="System.Net.NegotiateClient, System, Version=2.0.3600.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add type="System.Net.KerberosClient, System, Version=2.0.3600.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add type="System.Net.NtlmClient, System, Version=2.0.3600.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add type="System.Net.BasicClient, System, Version=2.0.3600.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</authenticationModules>
</system.net>
</configuration>