Session not sticking for ASP.NET MVC2 in IIS7.5 in IE8

会有一股神秘感。 提交于 2019-12-12 11:10:42

问题


We have an ASP.NET MVC2 web application. For reasons outside the scope of this issue we decided to use the classic session state in the application. Following features are implemented in it related to session.

  1. Session_Start event handler in global.asax stores a variable in session. This is in relation to a workaround to detect session expiration.
  2. Session being used has the following values in web.config:

    sessionState timeout="30" mode="InProc" cookieless="UseCookies"

  3. Forms authentication is being used has the following values set in web.config:

forms loginUrl="~/Account.aspx/LogOn" timeout="1440" protection="All" slidingExpiration="false"

The web application was working in IIS6 without issues, until we deployed it onto IIS7.5. On IIS7.5 Everything apart from Session seems to be working. It seems the session either regenerates or loses values; in short it doesn’t stick, only happens in IE8; still works in Chrome and firefox.

Search on Google leads to a possible answers that; the global.asax doesn’t get fired in IIS7.5. Some guys got it working as a web application in IIS7.5; but we are running it as a site. Converting it to a web application doesn’t seem to solve the problem for us as we tried that too.

The configuration for our new server is Windows 2008 R2, IIS7.5, asp.net framework 2,3.5 and 4 are installed on the machine.

An interesting aspect of this is that the session seems to be working on google chrome and firefox browsers; which leads us to think that this may have something to do with the cookie generation on the client.

If someone has faced this issue and has a resolution we are all ears.

Thanks in advance for the help.

来源:https://stackoverflow.com/questions/3956374/session-not-sticking-for-asp-net-mvc2-in-iis7-5-in-ie8

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