AuthenticationMode 枚举

定义

指定要在 Web 应用程序中使用的身份验证模式。Specifies the authentication mode to use in a Web application.

public enum class AuthenticationMode
public enum AuthenticationMode
type AuthenticationMode = 
Public Enum AuthenticationMode
继承
AuthenticationMode

字段

Forms 3

将基于 ASP.NET 窗体的身份验证指定为身份验证模式。Specifies ASP.NET Forms-based authentication as the authentication mode.

None 0

不指定身份验证。Specifies no authentication.

Passport 2

将 Microsoft Passport 指定为身份验证模式。Specifies Microsoft Passport as the authentication mode.

Windows 1

将 Windows 指定为身份验证模式。Specifies Windows as the authentication mode. 在使用 Internet 信息服务 (IIS) 身份验证方法(基本、简要、集成 Windows (NTLM/Kerberos) 或证书)时适用此模式。This mode applies when using the Internet Information Services (IIS) authentication methods Basic, Digest, Integrated Windows (NTLM/Kerberos), or certificates.

示例

下面的代码示例演示如何访问 Mode 属性。The following code example shows how to access the Mode property.

// 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使用属性以编程方式配置 Web 应用程序使用的身份验证类型。Use the Mode property to programmatically configure the type of authentication used by a Web application,

适用于

另请参阅