Windows身份验证会话超时 [英] windows authentication session timeout

查看:633
本文介绍了Windows身份验证会话超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这样的code在我的web.config:

I have this code in my web.config:

 <system.web>
    <authentication mode="Windows" />
        <sessionState timeout="300" />
  </system.web>

虽然超时的sessionState为300。它只是在15-20分钟过期和会话数据都将丢失。我的应用程序池和一切都正确的超时值设置为300分钟。所以我相信问题是,只有Windows身份验证。其次,如果我只是禁用Windows身份验证,然后删除该行,这一切工作了罚款(即我的会话数据是持续时间长preserved)。可以采取什么问题?

Even though sessionstate timeout is 300. It just expires in 15-20 mins and session data is lost. My Application pool and everything has correct timeout set of 300 minutes. So I believe problem is with Windows authentication only. Secondly, if I just disable the Windows authentication and remove that line, it all works out fine (i.e my session data is preserved for long duration). What can be the problem?

在此先感谢:)

推荐答案

确认空闲超时未设置在IIS应用程序池。该设置的默认值是20分钟(这会导致混乱超时是否由会话超时或空闲超时触发),在大多数情况下,可以安全地设置为0,将其关闭。

Make sure the idle timeout isn't set on the app pool in IIS. The default for that setting is 20 minutes (which leads to confusion over whether the timeout was triggered by session timeout or idle timeout) and in most cases can be safely set to 0, which turns it off.

要检查IIS中的空闲超时,进入高级设置的应用程序池。

To check the idle timeout in IIS, go to Advanced Settings for the app pool.

空闲超时是基于应用程序的活动滑动窗口,因此从任何客户端请求将重置窗口。如果您的应用轻易使用,你会频频命中超时,导致您的应用程序池回收。对用户的影响是,这已经积极将丢失任何会话,用户步行到您的应用程序已空闲之后将不得不等待它运行所有的启动过程。

The idle timeout is a sliding window based on activity for the app, so requests from any client will reset the window. If your app is lightly used, you'll hit the timeout frequently, causing your app pool to recycle. The impact to users is that any sessions that had been active will be lost, and users walking up to your app after it has been idle will have to wait for it to run all of its start up processes.

这篇关于Windows身份验证会话超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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