Where can you get information on the ASP.NET State Service e.g. how it works, performance, behaviour characteristics etc. Have looked on internet but cant find in depth information or an article dedicated to the subject. Thanks
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Programmatically, session state is nothing more than memory in the shape of a dictionary or hash table, e.g. key-value pairs, which can be set and read for the duration of a user's session.
Check following links for more details:
- "ASP.NET Session State" on MSDN
- "Session State Overview" on MSDN
回答2:
For SQL Server State Management remember that you don't call Session["Key"]
in loops. (Try to avoid that) Because everytime it accesses the session then a roundtrip to sqlserver is made.