AuthenticationMode 列舉
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
指定要在 Web 應用程式中使用的驗證模式。
public enum class AuthenticationMode
public enum AuthenticationMode
type AuthenticationMode =
Public Enum AuthenticationMode
- 繼承
欄位
| 名稱 | 值 | Description |
|---|---|---|
| None | 0 | 沒有指定任何認證。 |
| Windows | 1 | 指定 Windows 作為認證模式。 此模式適用於使用網際網路資訊服務(IIS)認證方法的 Basic、Digest、Integrated Windows(NTLM/Kerberos)或憑證。 |
| Passport | 2 | 指定 Microsoft Passport 作為認證模式。 |
| Forms | 3 | 指定 ASP.NET 表單式驗證作為認證模式。 |
範例
以下程式碼範例說明如何存取該 Mode 物業。
// Get the current Mode property.
AuthenticationMode currentMode =
authenticationSection.Mode;
// Set the Mode property to Windows.
authenticationSection.Mode =
AuthenticationMode.Windows;
' Get the current Mode property.
Dim currentMode As AuthenticationMode = _
authenticationSection.Mode
' Set the Mode property to Windows.
authenticationSection.Mode = _
AuthenticationMode.Windows
備註
利用這個 Mode 屬性來程式化地設定網頁應用程式所使用的認證類型,