Export (0) Print
Expand All

FormsAuthentication.EnableFormsAuthentication Method

Enables forms authentication.

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

static member EnableFormsAuthentication : 
        configurationData:NameValueCollection -> unit

Parameters

configurationData
Type: System.Collections.Specialized.NameValueCollection

A name-value collection that contains values for "defaultUrl" and/or "loginUrl". The parameter can be null if there are no values for the default URL or the login URL.

ExceptionCondition
InvalidOperationException

The application is not in the pre-start initialization phase.

If the DefaultUrl property is a null reference (Nothing in Visual Basic), that property is set to the default URL value from the configurationData parameter. If the LoginUrl property is a null reference (Nothing in Visual Basic), that property is set to the login URL value from the configurationData parameter.

.NET Framework

Supported in: 4.6, 4.5, 4
Show:
© 2015 Microsoft