FormsAuthenticationConfiguration.Cookieless Property

Definition

Gets or sets a value indicating whether forms-based authentication should use cookies.

[System.Configuration.ConfigurationProperty("cookieless", DefaultValue=System.Web.HttpCookieMode.UseDeviceProfile)]
public System.Web.HttpCookieMode Cookieless { get; set; }

Property Value

One of the HttpCookieMode values. The default value is UseDeviceProfile.

Attributes

Examples

The following code example demonstrates how to access the Cookieless property. Refer to the code example in the FormsAuthenticationConfiguration class topic to learn how to get the section.

// Get current Cookieless.
System.Web.HttpCookieMode currentCookieless =
    formsAuthentication.Cookieless;

// Set current Cookieless.
formsAuthentication.Cookieless =
    HttpCookieMode.AutoDetect;

Remarks

The Cookieless property defines whether forms-based authentication should use a cookie to exchange user information.

Applies to

Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also