Export (0) Print
Expand All
Expand Minimize

AuthenticationMode Enumeration

Specifies the authentication mode to use in a Web application.

Namespace:  System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

public enum AuthenticationMode

Member nameDescription
FormsSpecifies ASP.NET Forms-based authentication as the authentication mode.
NoneSpecifies no authentication.
Passport Obsolete. Specifies Microsoft Passport as the authentication mode.
WindowsSpecifies 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.

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

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;

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1
Show:
© 2015 Microsoft