ASP.NET randomly losing session values

后端 未结 6 1292
一整个雨季
一整个雨季 2021-02-14 19:22

I\'ve been searching for answers for quite some time on this as it continues to plague me. We store user login info and other data about the user\'s current activities in Sessi

6条回答
  •  [愿得一人]
    2021-02-14 19:56

    if your web app deployed on a server farm (more then one server web) As you said you are using an InProc session and it may happen the user is redirect to a different server from the one where it is has been stored that session variable. In this case you should go for an out of proc session as you have mentioned(Session State Server)

    if you go for a State Server bear in mind the below just to prevent any other issue:

    Since the Stateserver combines the ASP.NET Session ID with the IIS application path to create a unique key, sessions issued for one of the five new webs could not be found when accessed through one of the other webs which is obviously extremely unfortunate in a weighted round robin load balanced web farm

    http://www-jo.se/f.pfleger/session-lost

    have also a look at this logger to understand if the app recycle against your will:

    http://weblogs.asp.net/scottgu/archive/2005/12/14/433194.aspx

    http://blogs.msdn.com/b/tess/archive/2006/08/02/asp-net-case-study-lost-session-variables-and-appdomain-recycles.aspx

提交回复
热议问题