通过


AuthenticationMode 枚举

定义

指定要在 Web 应用程序中使用的身份验证模式。

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

字段

名称 说明
None 0

指定无身份验证。

Windows 1

将 Windows 指定为身份验证模式。 此模式适用于使用 Internet Information Services(IIS)身份验证方法的基本、摘要、集成 Windows(NTLM/Kerberos)或证书。

Passport 2

将 passport 指定为身份验证模式Microsoft。

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 属性以编程方式配置 Web 应用程序使用的身份验证类型,

适用于

另请参阅