ASP.NET randomly losing session values

后端 未结 6 1293
一整个雨季
一整个雨季 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 20:07

    I ran into this problem because our server was setup to run https. The sessions would not be retained if I ran under simple http. However, the sessions were retained when running on https. So we setup a URL rewrite rule to always send the application to https if they came in via http.

    In addition sessions will not work locally or on the server unless you are running https (note the S on the end of https), if you have the following in your web.config file:

    
    

提交回复
热议问题