共用方式為


AuthenticationMode 列舉

定義

指定要在 Web 應用程式中使用的驗證模式。

public enum class AuthenticationMode
public enum AuthenticationMode
type AuthenticationMode = 
Public Enum AuthenticationMode
繼承
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 屬性來程式化地設定網頁應用程式所使用的認證類型,

適用於

另請參閱