HttpSessionState.CookieMode Property

Gets a value that indicates whether the application is configured for cookieless sessions.

Namespace: System.Web.SessionState
Assembly: System.Web (in system.web.dll)

public HttpCookieMode CookieMode { get; }
/** @property */
public HttpCookieMode get_CookieMode ()

public function get CookieMode () : HttpCookieMode

Not applicable.

Property Value

One of the HttpCookieMode values that indicate whether the application is configured for cookieless sessions. The default is UseCookies.

When IsCookieless is true, the CookieMode property returns UseUri; otherwise the CookieMode property returns UseCookies.

The following code example sets the cookieless session attribute to true in the Web.config file. For this sample application configuration, the CookieMode property would return UseUri.

      timeout="30" />

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