Edytuj

Udostępnij za pośrednictwem


AuthenticationMode Enum

Definition

Specifies the authentication mode to use in a Web application.

public enum class AuthenticationMode
public enum AuthenticationMode
type AuthenticationMode = 
Public Enum AuthenticationMode
Inheritance
AuthenticationMode

Fields

Name Value Description
None 0

Specifies no authentication.

Windows 1

Specifies Windows as the authentication mode. This mode applies when using the Internet Information Services (IIS) authentication methods Basic, Digest, Integrated Windows (NTLM/Kerberos), or certificates.

Passport 2

Specifies Microsoft Passport as the authentication mode.

Forms 3

Specifies ASP.NET Forms-based authentication as the authentication mode.

Examples

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

Remarks

Use the Mode property to programmatically configure the type of authentication used by a Web application,

Applies to

See also