Export (0) Print
Expand All
Expand Minimize
0 out of 1 rated this helpful - Rate this topic

HttpCookieMode Enumeration

Specifies how cookies are used for a Web application.

Namespace:  System.Web
Assembly:  System.Web (in System.Web.dll)
public enum HttpCookieMode
Member nameDescription
UseUriThe calling feature uses the query string to store an identifier regardless of whether the browser or device supports cookies.
UseCookiesCookies are used to persist user data regardless of whether the browser or device supports cookies.
AutoDetectASP.NET determines whether the requesting browser or device supports cookies. If the requesting browser or device supports cookies then AutoDetect uses cookies to persist user data; otherwise, an identifier is used in the query string. If the browser or device supports the use of cookies but cookies are currently disabled, cookies are still used by the requesting feature.
UseDeviceProfileASP.NET determines whether to use cookies based on System.Web.HttpBrowserCapabilities setting. If the setting indicates that the browser or device supports cookies, cookies are used; otherwise, an identifier is used in the query string.

The HttpCookieMode enumeration is used to specify the value of the cookieless attribute in the sessionState configuration section. It is used by all features that support cookieless authentication.

The HttpCookieMode enumeration values specify how a cookie should be used to maintain information about the user. When AutoDetect is used, ASP.NET queries the browser or device to determine whether it supports cookies. If the browser or device supports cookies, then cookies are used to persist user data; otherwise, an identifier is used in the query string.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.