Setting default Asp.Net Session memory consumption? [duplicate]
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.
精彩评论