Reputation:
I know I can store small values to the Session
.
Lately in my Visual Studio ASP.NET application, I've learned I can also store larger values, such as a DataTable
.
This leaves me wondering how much storage the Session
can store. Does this depend on the browser or the RAM on the PC?
Upvotes: 1
Views: 1317
Reputation: 712
ASP.NET Session is stored on the webserver that is hosting the website. So the limitation would be how much RAM is on your webserver, not the browser or RAM on the client PC. So if you have 4 users on your site, and each has 128MB of session, then your webserver is going to have more than 512MB of RAM dedicated to ASP.NET.
I also would be very careful about storing a lot of things in session. Especially complex types like DataTable. This is because every time you access that object it has to serialized/deserialized, and this can be very taxing on your webserver's CPU.
I would recommend reading up on some best practices for ASP.NET Session.
Upvotes: 2