会话在我们编辑web.config之后过期 [英] Session expire after we edit web.config

查看:145
本文介绍了会话在我们编辑web.config之后过期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编辑Web.config文件时,会话将到期的原因是什么

我尝试过的事情:

如果我编辑连接字符串或会话时间,它将自动过期.

what the Reason that our session is going to expire when we edit Web.config file

What I have tried:

If i Edit Connection String or Session time,it automatically gets Expired.

推荐答案

更改web.config将回收整个应用程序,导致所有会话被破坏,并导致下一个请求后,网站需要一段时间才能重新启动.无论如何,您都不应该更改web.config,如果您更改连接字符串,那么您的站点可能甚至无法正常工作,那么为什么还要担心会话已过期?如果要将web.config作为代码体系结构的一部分进行更改,那确实是一个非常糟糕的主意.

使用状态服务器存储的会话将在web.config更新后仍然有效,但是如上所述,如果更新web.config对您来说是一个问题,那么您的体系结构就存在问题.
Changing the web.config will recycle your entire application causing all sessions to be destroyed, and causing the site to take a while to start up again after the next request. You shouldn''t be changing the web.config anyway, if you are changing connection strings then your site probably isn''t even working so why do you care that sessions are expired? If you''re changing the web.config as part of your code architecture then that is a very bad idea indeed.

Sessions stored using the State Server will survive a web.config update but as above, if updating the web.config is a problem for you then there is something very wrong with your architecture.


这篇关于会话在我们编辑web.config之后过期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆