Session State Management
page 2 of 9
by Joydip Kanjilal
Feedback
Average Rating: 
Views (Total / Last 10 Days): 72723/ 79

Session, Session ID and Session State

A Session is defined as a session or the duration of connectivity between a client and a server application.  A Session object is created and maintained on the web server and is unique to a user’s session of communication with the web server.  Note that an object must be serializable in order to be persisted in the Session object.

When a Session starts, the browser sends a cookie with a session identifier along with every request.  The IIS web server uses this Session ID to determine whether it belongs to an existing session.  If none is found, a Session ID (120 - bit string) is generated along with the request.  The Session ID persists as long as the browser session is alive even though the session state expires after the specified timeout.  Hence, the same session ID can represent multiple sessions over time where the browser instance is the same.

Session State is a collection of objects that are stored in the memory of the web server.  But where is the Session State stored?  In II5, Session State is stored in the memory of the process aspnet_wp.exe.  In IIS6, by default all applications share the same application pool, i.e. the session state is stored in the memory of the process w3wp.exe.  They are not isolated per application basis, but instead per application pool (w3wp.exe).


View Entire Article

User Comments

Title: Really Nice   
Name: PRABHURAJAN_G
Date: 2006-12-22 9:36:38 AM
Comment:
Its really excellent, and i am so cleared with the ideas of session expiration
Title: Firefox and IE process session differently   
Name: Michael
Date: 2006-12-20 11:36:26 AM
Comment:
Hi,

I found firefox keeps same value of "ASP.NET_SessionId" session on every new opened browser window. But IE generated a new "ASP.NET_SessionId". So you could not share sesssion data between new opened browser window in IE.

Michael
Title: Session State questions   
Name: Michael
Date: 2006-12-18 4:28:19 PM
Comment:
Hi Joydip,

I could access to session using both "Response.Redirect(url,false);" and "Response.Redirect(url)". I really could not tell what's the differences between them.

Recently one my cowork set "sessionState mode='StateServer'" instead of "mode='InProc'", because he said the session were lost sometimes. Did you have this kind of problem? If you had it, please tell me how you fixed it.

By the way, if I have big data block, like a big hashtable, Should I save it to session or viewstate? Why?

Thanks.
Michael
Title: Great   
Name: Nadeem Abbasi
Date: 2006-12-08 7:45:55 AM
Comment:
It is very Comprehensive article about Session State Management and also great contribution from Joydip Kanjilal for developers.

--MNA_4U@HOTMAIL.COM
Title: Thanx   
Name: Sudeep
Date: 2006-12-07 3:31:09 AM
Comment:
Very much informative.
Title: state management   
Name: Nitu Singh
Date: 2006-12-06 3:10:28 AM
Comment:
It,s really too good.
Title: Very Nice   
Name: Rajesh
Date: 2006-11-29 8:40:13 PM
Comment:
Very nice article. So many gud points are covered about sessions state storage.

Thanks for the Author.
Title: Abt Session manage ment   
Name: Subhashree
Date: 2006-11-29 5:53:53 AM
Comment:
Excellant Article
Title: I like it too much   
Name: Nguyen Letan
Date: 2006-11-28 9:22:12 PM
Comment:
It's helpful for me. Thanks!
Title: Reema   
Name: Agarwal
Date: 2006-11-26 12:26:24 PM
Comment:
Simply Outstanding
Title: GOOD   
Name: KIRAN
Date: 2006-11-25 5:38:58 AM
Comment:
ITS VERY GOOD
Title: Nice   
Name: Ramana
Date: 2006-11-24 4:37:50 AM
Comment:
Way of explaination is good.
Title: IAtanasov   
Name: Ivan Atanasov
Date: 2006-11-23 9:42:35 AM
Comment:
This is fantastic advice for understand Session State!
Title: Excellant solution to understand session state   
Name: Doss
Date: 2006-11-18 6:03:51 AM
Comment:
It gives easy way to understand session state.Like this i want defn for state mangement .
Title: Session State Management   
Name: A. Ravi Srinivas
Date: 2006-11-18 12:22:56 AM
Comment:
This article seems to be excellent.
I got benefited from Joydip Kanjilal old article on collections as well.
Hope we will get many more from you Joydip Kanjilal
Thanks
Ravi

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-13 1:02:14 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search