开发者

Setting default Asp.Net Session memory consumption? [duplicate]

This question already has answers here: How to find out size of session in ASP.NET from web application? (4 answers) Closed 2 years ago.

S开发者_运维知识库ome while ago I found a web page explaining the default size of a session was 2048 kb, the minimum was 1 kb.

How can this be adjusted? And if some one has links regarding the subject I would be a happy camper :)

Sorry not for mentioning the IIS, but it is 7.0

Cheers


There is no real limit set for it. It is simply objects stored in .Net. Standard Windows process limits apply. You can apply a global limit in IIS (AppPool settings).

There is however a consideration to make when you use ASP.Net State Service or SQL State Storage. The Session object must be serialized, sent to the store, retrieved and deserialized. This is a very expensive process. Therefore you want to limit the amount of data you store in Session.

If you use internal state storage then the Session is simply kept in memory (no overhead), but this approach usually doesn't scale well with web clusters.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜