HttpCookieMode Enum

Definition

Specifies how cookies are used for a Web application.

public enum HttpCookieMode
Inheritance
HttpCookieMode

Fields

Name Value Description
UseUri 0

The calling feature uses the query string to store an identifier regardless of whether the browser or device supports cookies.

UseCookies 1

Cookies are used to persist user data regardless of whether the browser or device supports cookies.

AutoDetect 2

ASP.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.

UseDeviceProfile 3

ASP.NET determines whether to use cookies based on 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.

Remarks

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.

Applies to

Producto Versiones
.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