ASP.NET Session size limitation

asp.net, c#

Solution

Yes, it is reliable enough. It just isn't very scalable, so plan ahead. This will totally grind to a halt when you run it on more than 1 server. And there is sort of a limit: Number-of-concurrent-Users * SizeOf-Session < Available-Mem

It depends of course on the size of the tables, storing a few kB is usually acceptable (although high traffic sites will try to keep it smaller).

If your users can share tables, then you can place that data in the Application object, a great saving.

And a session object is limited to the TimeOut setting, default is 20 min. One way to optimize memory consumption is reducing that, but that is a trade off with user convenience.

Problem

Is there some kind of Session size limitation or advisable value to not to surpass ? In my web application I create a few DataTables to store user selections which are stored in session until user approves selections so I add those values to database. The problem is that I don't know whether session is reliable enough to keep few objects in or not ? Thanks! more info Session size is about 10-20KB max.

Original source