Session is stored on the server. Each session
associated with ID (unique ID, known as a Session ID). This ID is stored in
client's cookie as well, but in case of cookieless sessions, ID is stored in
the URL
Generally this Session ID
will be stored in cookie, for every request, browser will send this cookie back
to server and will track the user session and restore correct user session back
for that request.
Asp.net also supports
cookieless sessions with the following attribute addition in the web.config
within system.web node
<sessionstate cookieless="true" />
The
possible values for "cookieless" attribute are:
- AutoDetect : Session uses background cookie if cookies are enabled. If cookies are disabled, then the URL is used to store session information.
- UseCookie: Session always use background cookie. This is default.
- UseDeviceProfile: Session uses background cookie if browser supports cookies else URL is used.
- UseUri: Session always use URL.
Comments
Post a Comment