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)

public HttpCookieMode Cookieless { get; set; }
/** @property */
public HttpCookieMode get_Cookieless ()

/** @property */
public void set_Cookieless (HttpCookieMode value)

public function get Cookieless () : HttpCookieMode

public function set Cookieless (value : HttpCookieMode)

Not applicable.

Property Value

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.

NoteNote:

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.

// Get Cookieless.
System.Web.HttpCookieMode cookieless =
    anonymousIdentificationSection.Cookieless;
Console.WriteLine("Cookieless: {0}",
          cookieless);

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft