System.Web.Configuration Namespace
Specifies the authentication mode to use in a Web application.
Member |
Description |
Forms |
Specifies ASP.NET Forms-based authentication as the authentication mode. |
None |
Specifies no authentication. |
Passport |
Specifies Microsoft Passport as the authentication mode. |
Windows |
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. |
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;
' Get the current Mode property.
Dim currentMode As AuthenticationMode = authenticationSection.Mode
' Set the Mode property to Windows.
authenticationSection.Mode = AuthenticationMode.Windows |
|
C# |
VB |
<authentication> Section AuthenticationSection Class ASP.NET Authentication