ASP.NET会话大小限制 [英] ASP.NET Session size limitation

查看:116
本文介绍了ASP.NET会话大小限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有某种会话大小限制或建议的价值不超过?
在我的web应用程序我创建几个数据表来存储用户之前批准的选择,所以我这些值添加到数据库,存储在会话的用户选择。
问题是我不知道会话是否足够可靠保持几个对象与否?

Is there some kind of Session size limitation or advisable value to not to surpass ? In my web application i create few DataTables to store user selections which are stored in session until user approves selections so i add those values to database. problem is i don't know whether session is reliable enough to keep few objects in or not ?

感谢

更多信息

会议规模约为10-20KB最大

Session size is about 10-20KB max

推荐答案

是的,是的可靠就够了。它只是是不是很可扩展,所以未雨绸缪。这将彻底粉碎,当你超过1服务器上运行它停了下来。结果
而有几分的限制:数的并发,用户*一下SizeOf会话<可用-MEM

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

这取决于当然对表的大小,存储几KB通常是可以接受的(虽然高流量的网站会尽量保持较小)。

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).

如果您的用户可以共享的表,那么你可以将这些数据在Application对象,极大的节约。

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

和会话对象仅限于超时设置,默认为20分钟。优化内存消耗单程被减少,但这是与用户便利一个折衷。

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.

这篇关于ASP.NET会话大小限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆