ASP.NET 为什么会话超时,会话状态超时设置 [英] ASP.NET Why are sessions timing out, sessionstate timeout set

查看:32
本文介绍了ASP.NET 为什么会话超时,会话状态超时设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,我的 web.config 中有以下行

Hey I have the following line in my web.config

<sessionState mode="InProc" timeout="45"/>

我认为这可以使会话保持完整 45 分钟

Which I thought would keep sessions intact for 45 mins

但我见过这样一种情况,如果用户处于非活动状态,比如说 15 分钟,会话就会超时.

But I have seen the case where if a user is inactive for lets say 15 mins the sessions times out.

我该如何阻止?

刚刚注意到我在母版页中有以下行

Edit : Just noticed I have the following line in the master page

meta http-equiv="Refresh" content="1800;URL=http://www.virtualacademy.ie/login.aspx">

meta http-equiv="Refresh" content="1800;URL=http://www.virtualacademy.ie/login.aspx">

也许这是导致问题的原因,上面的行是做什么的,即数字 1800

Maybe this is causing the issue, what is the above line doing i.e the number 1800

推荐答案

如果用户关闭浏览器或清除 cookie,或者服务器上的 AppDomain 被回收,会话状态将丢失.

If the user closes their browser or clears cookies, or if the AppDomain on the server is recycled, the session state will be lost.

您是否检查过日志以查看应用程序是否正在回收?

Have you checked logs to see if the app is recycling?

这篇关于ASP.NET 为什么会话超时,会话状态超时设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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