asp.net iis7会话超时?
我知道这是一个常见问题,但我已经尝试了找到的所有建议,但似乎没有一个对我有用。
我有一个由托管提供商提供的 Windows 专用服务器。我有一个用asp.net 开发的网站。我想增加会话超时(而不是应用程序超时),这意味着我希望会话持续更长时间。
我尝试通过在其中添加此行来编辑 web.config 文件
<sessionState timeout="60"></sessionState>
并且我尝试按照以下文章在 iis 中更改此值:
http://technet.microsoft.com/en-us/library/cc725820(v=ws.10).aspx
我的 web.config 文件中的身份验证部分如下:
<authentication mode="Windows"/>
无这些选项似乎有效。 5 分钟(或更短时间)后会话值将为空。我已经登录,等待了将近 6 分钟,当尝试访问另一个页面时,Session 值为 null。
任何帮助将不胜感激。
I know this is a common problem, but I've tried every suggestion I've found and none of them seems to work for me.
I have a Windows Dedicated Server with a hosting provider. I have a Web site developed in asp.net. I want to increase the session timeout (not the application timeout), meaning, I want sessions to last longer.
I've tried editing the web.config file by adding this line inside
<sessionState timeout="60"></sessionState>
And I've tried changing this value in iis by following this article:
http://technet.microsoft.com/en-us/library/cc725820(v=ws.10).aspx
The authentication section in my web.config file is as follows:
<authentication mode="Windows"/>
None of these options seems to work. The session values are null after 5 mins (or less). I've logged in, waited almost 6 minutes, and when tried to access another page, the Session value was null.
Any help would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在全局 asax 文件中尝试这个
try this in the global asax file
首先检查Windows事件日志以确保工作进程没有被强制回收。(事件查看器->Windows日志->系统)
您的代码中可能存在某些内容导致工作进程强制自身回收。
您可以在 IIS=>池应用程序=>更改会话超时的高级设置中进行这些更改
First Check the Windows Event Log to ensure that the Worker Process is not being forced to recycle.(Event Viewer->Windows Log->System)
There may be something in your code that causes the Worker Process to force itself to recycle .
You can to make these changes in the IIS=>Pool Application=>Advance Setting For Change Session Time Out