IsCookieless Property

HttpSessionState.IsCookieless Property

Gets a value indicating whether the session ID is embedded in the URL or stored in an HTTP cookie.

[Visual Basic]
Public ReadOnly Property IsCookieless As Boolean
public bool IsCookieless {get;}
public: __property bool get_IsCookieless();
public function get IsCookieless() : Boolean;

Property Value

true if the session is embedded in the URL; otherwise, false.


ASP.NET maintains cookieless session state by automatically modifying any URL with a session ID that uniquely identifies the session. For example, the following URL has been modified by ASP.NET to include the unique session ID lit3py55t21z5v55vlm25s55:

ASP.NET modifies the links contained in all requested pages by embedding a session ID value in the links just before sending each page to the browser. Session state is maintained as long as the user follows the path of links that the site provides. However, if the user-agent rewrites a URL, the session state instance probably will be lost.

The session ID is embedded immediately after the slash that follows the application name and immediately before any remaining file or virtual directory identifier. This allows ASP.NET to resolve the application name before involving the SessionStateModule in the request.


Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

HttpSessionState Class | HttpSessionState Members | System.Web.SessionState Namespace

© 2016 Microsoft