问题描述
我感到困惑ASP或ASP.Net会话生命时间(或生命周期)的概念。更具体地讲,我的困惑是:
- 如何IIS决定何时启动新会话和现有会话结束?尤其是如何决定的IIS会话是否继续或结束时,我们称之为重定向code?
- 我们如何设置会话过期的时间? (目前我只知道通过
的web.config的sessionState
项目来设置它。) - 是否有可能在一个会话访问另一个会话的变量?
-
会话开始,因为该请求不包含会话cookie,或者它确实包含不再映射到一个会话的会话cookie。会话被终止)已坐在闲置,引用它的超时周期没有进一步的要求。 b)大会由code故意中止。 c)在处理时的过程确实会死,例如当应用程序被回收。
-
不同的方法来改变超时基本上对矫正反正web.config中或从该值是继承的配置文件。
-
不,除非会话对象是故意code放置的地方,另一个会话可以访问它。
I am confused about ASP or ASP.Net session life time (or life cycle) concepts. More specifically, my confusions are:
- How does IIS decide when a new session starts and an existing session ends? Especially how does IIS decide whether a session continues or ends when we call redirect code?
- How can we set session expire time? (Currently I only know to set it through
web.config sessionState
item.) - Is it possible for one session to access another session's variables?
Session starts because the request does not contain a session cookie or the session cookie it does contain no longer maps to a session. A session ends by a) it has sat idle with no further requests referencing it for the timeout period. b) Its deliberately aborted by code. c) In-process session dies when the process does, e.g. when the app is recycled.
Different ways to change the timeout are basically modifing the web.config anyway or a config file from which the value is inherited.
Not unless the session object is deliberately placed by code somewhere that another session can access it.
这篇关于了解ASP.Net会话续航时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!