Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

AnonymousIdentificationSection.Cookieless Property

Gets or sets a value indicating whether to use cookies.

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

[<ConfigurationPropertyAttribute("cookieless", DefaultValue = HttpCookieMode.UseCookies)>]
member Cookieless : HttpCookieMode with get, set

Property Value

Type: System.Web.HttpCookieMode
One of the HttpCookieMode values. The default value is UseDeviceProfile.

The Cookieless property defines when a cookie should be used to maintain information about the user.

When the Cookieless property is set to UseCookies, the user's identifier is stored in a cookie. For more information, refer to HttpCookieMode.


ASP.NET stores the user's anonymous identifier within the URI path (that is, it runs in cookieless mode) if the Cookieless property is set to one of the following values: UseUri; UseDeviceProfile when the browser profile indicates that cookies are not supported; or AutoDetect when the auto-detection process determines that the browser does not support cookies. Finally, if the size of the URI and the anonymous identifier exceeds the allowed length, the anonymous identifier is not applied.

The following code example demonstrates how to access the Cookieless property.

No code example is currently available or this language may not be supported.

.NET Framework

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