Last post Sep 13, 2011 07:30 AM by jeet.patel
Sep 11, 2011 11:59 AM|venki86_ece|LINK
what kind of data could be stored in session state? this was one of the question asked by interviewer. Could you help me, what the interviewer what trying to get out from me.
Sep 11, 2011 12:04 PM|princeG|LINK
Your nanswer is :
Any amount of data can be stored there because the session is kept on the server side.
The only limitation is sessionId length, which shouldn't exceed ~4000 bytes - this limitation is implied by HTTP header length limitation to 4Kb since sessionId may be stored in the cookie or encoded in URL (using "URL rewriting") and the cookie specification
says the size of cookie as well as HTTP request (e.g. GET /document.html\n) cannot be longer then 4kb.
Sep 13, 2011 05:57 AM|karang|LINK
In the session state you can store any kind of data but data should be in serialized form. For example if you want any class to store in the session state then it should have Serialized attribute above the class. Hope it helps.
Sep 13, 2011 07:30 AM|jeet.patel|LINK
There is three kind of session state available in asp.net, and you can store any size of object in session but when you need the data from session need casting.
If you are using inporc mode of session than no need to serialize the object.
If you are using outproc or sqlserver than you have to serialize the object.