IIS会话重置 [英] IIS Session Reset

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

问题描述

我的工作包含会话的Web项目。
我对Web应用程序几页:
Logon.aspx - 如果用户的验证是OK,创建一个新的会话:

I'm working on a web project that contains sessions. I have a few pages on the web app: Logon.aspx - If the verification of user is OK, a new session is created:

伪:

    If User.connected = True Then
        Session("isLogin") = True
        Response.Redirect("Content.aspx")
    End If

在Page_Init事件中的Content.aspx

In the "Content.aspx" in the Page_Init event:

    If Session("isLogin") = False Then
        Response.Redirect("Logon.aspx")
    End If

web.config设置:

Web.config settings:

<forms loginUrl="~/Logon.aspx" timeout="50" />
<sessionState mode="InProc" timeout="60">

当我运行它的本地(IIS防爆preSS),所有的作品如预期。照片然而,当我在IIS服务器上运行它,几分钟后会重置并抛出我Logon.aspx。

When I run it locally (IIS Express), all works as expected.
However, when I run it on the IIS server, after a few minutes the session resets and throws me to Logon.aspx.

IIS服务器的信息:

我使用IIS 8.5

I am using IIS 8.5

空闲超时(分钟):60

Idle Time-out (minutes): 60

常规时间间隔(分钟):1740

Regular Time Interval (minutes): 1740




我怎样才能解决这个会话重置?



How can I fix this session reset?

P.S。
我读过您的建议(到3月14日'15)。结果同样,在读<一个所有建议href=\"http://stackoverflow.com/questions/648992/session-timeout-in-asp-net\">session-timeout-in-asp-net),但无法找到一个解决方案。

P.S. I have read all your suggestions (until Mar 14 '15).
Also, read all suggestions at session-timeout-in-asp-net), but could not find a solution.

推荐答案

我有previously使用的应用程序池的设置: .NET V4.5

I have previously used Application Pool with the settings: .NET v4.5

在更改应用程序池的设置为 .NET V4.5经典,问题停了!

When I change Application Pool’s settings to .NET v4.5 Classic, the problem stopped!

这篇关于IIS会话重置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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