ASP.NET randomly losing session values

后端 未结 6 1291
一整个雨季
一整个雨季 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:59

    The session issues you are facing can happen because of multiple reasons

    1. Session expiration : as you are using Inproc mode, sessions are valid only for the sessiontimeout timeperiod. which is 20 mins by default. try to use sessionstate tag in system.web section of your web .config and set timeout value to a larger value.

    2. Another Issue could be because of webfarms and web gardens. if you have configured web farms and web garden for your web site. Inproc session sharing can cause issues.

    3. Process restarts: w3p process of your website is getting restarted because of some issue in code. or memory leaks.

提交回复
热议问题