Okay, I know you shouldn't keep too much in session, and it's more of an architectural issue than anything else (move the session state to another server, db, load balance web server), but is there a way to开发者_JAVA技巧 tell .net to start scavenging for ram if there is too much being stored in session?
There is nothing built in that monitors the size of sessions, so you may have to build one yourself.
Consider using the Cache
class - it has size controls that will evict older entries for newer ones and you can use a session ID as part of the cache key.
精彩评论