ASP.NET Session Object Reliability RRS feed

  • Question

  • User9952089 posted

    I know this is old discussion and very frequently asked topic, but wants to deep dive little bit more...

    I am looking for more reliable methods of preserving the data behind the page intil data get saved by user. I mean i have a requirement to store lots of complex data temporarily behind the page until user click on save. i don't want to keep in viewstate due to performance reason, so i end up using session which made sense for this assignment and it is working great as far as functionality goes. But there are some unusual behaviour i have seen which loose the data from it strangely. There are instances that users keep the page for 6-8 hours or whole day after standby PC mode. 

    I know i can increase the session timeout into web.config which i did, but looking for some reliability statistic on that. 

    I mean How much data in session is too much?? How Much Time in Session timeout is reliable 1 hour,4 hour, 8 hour or 24 hours??? Does this statistics depend on number of users on site?? Also what are the list of factors can cause session lost otherthan timeout and Pool recycle???

    Also Any body can assist on Any secure method to not loose data and also keep high performance??

    Monday, May 9, 2016 5:58 PM

All replies

  • User-286291038 posted

    Hi Nicksoft,

    I think Appfabric may be a good candidate for handling session.

    Some good discussion on your question can be found in the below posts,



    Monday, May 9, 2016 7:27 PM
  • User753101303 posted


    IMHO this is not really a reliability problem. Session works usually as it should with its own expected behavior. You could also try the db or the session state server.. I would say the basic usage is for small pieces of very frequently used data and preferably that could be restored if lost. Question usage if going beyond that.

    I'm not sure to get your exact scenario but for a complex and long editing process I would likely consider to just using temporary tables or maybe even regular tables with a "draft" flag. If applicable to your scenario, you could even consider to let users to retrieve the same "draft" data, the next time they connect (or at least f this not too much time later).

    As often it might be easier to discuss that if you explain the functionality rather than how it is currently implemented. What is the critical point about performance?

    Monday, May 9, 2016 11:29 PM
  • User-1636183269 posted

    Encrypt the data and store value in Hidden Variable.

    Tuesday, May 10, 2016 1:01 AM
  • User9952089 posted

    thanks PatricSc for your reply. i know Session state works as it suppose to be and how it is configured. 

    My question is i wants to know the Actual statistics behind the session state life cycle and its capacity.

    I mean How Much Session State Data is Max based on How Much Server Memory And How Many Users For How Much Time???? I mean are there any proven session state performance measurement statistics available that we can refer for our actual scenario??

    Tuesday, May 10, 2016 12:46 PM