IIS Session Reset

陌路散爱 提交于 2019-12-11 10:58:31

问题


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:

Pseudo:

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

In the “Content.aspx” in the Page_Init event:

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

Web.config settings:

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

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 Server information:

I am using IIS 8.5

Idle Time-out (minutes): 60

Regular Time Interval (minutes): 1740



How can I fix this session reset?

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.


回答1:


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

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



来源:https://stackoverflow.com/questions/28792488/iis-session-reset

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!