Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
AuthenticationMode Enumeration
Collapse the table of content
Expand the table of content

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 = 

            // Set the Mode property to Windows.
            authenticationSection.Mode = 

.NET Framework

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