简体   繁体   中英

How to store the aspx page in a session ?

I have asked this question in one interview. Can you please expain is it possible to store the entire aspx page in a session. If possible, which session mode should we use? Can you please provide me any link or code so that I will get some idea about it.

The right way to cache pages in a custom way is to build your own provider. The problem is, at the moment when the items are requested from cache or added in cache, the Session object is not created yet (is null) so you can't use session to store the pages.

i think he/she wants to ask about the affect of the large session-state variables on server memory, if so , this may helps

Disadvantage of using session state are:
Performance considerations :
Session-state variables stay in memory until they are either removed or replaced,
and therefore can degrade server performance. Session-state variables 
that contain blocks of information, such as large datasets, can adversely affect
Web-server performance as server load increases.

source

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM