ASP.NET session vs session state and cookies vs cookie less -


please me whether understanding right.

  1. asp.net sessions stored on web server , no cookies whatsoever used this.

  2. asp.net if configured use session webconfig->session state: can configure either stateconnection or sqlconnection.

  3. asp.net if configured use session state (either stateconnection or sqlconnection) when user uses sessions in code cookies on client machine used unless specify in webconfig cookieless=true

  4. if use <sessionstate cookieless="true" /> default stateconnection set localhost

when talking session in many dynamic web sites want store user data between http requests (because http stateless , can't otherwise associate request other request), don't want data readable / editable @ client side because don't want client play around data without passing through (server side) code.

the solution store data server side, give "id", , let client know (and pass @ every http request) id. there go, sessions implemented. or can use client convenient remote storage, encrypt data , keep secret server-side.

of course there other aspects consider, don't want people hijack other's sessions, want sessions not last forever expire, , on.

session state contains information pertaining specific session (by particular client/browser/machine) server. it's way track user doing on site.. across multiple pages...amid statelessness of web. e.g. contents of particular user's shopping cart session data. cookies can used session state.

cookies small pieces of text, stored on client's computer used website setting cookies. allows webapplications save information user, , re-use on each page if needed. every session have sessionid. , session id unique number, server assigns specific user, during visit(session). , defaultely, session id attached cookie , cookie shared client server (and server client) during requests/responses. , server identify session based on session id retrieved cookie.

and regarding cookieless, if browser doesnt support cookie or disabled, cookieless used. since cookieless, asp.net can not create cookie save session id. instead, session id passed in query string.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -