How to keep user login in to system and logout only after user clicks on logout button?

后端 未结 8 1481
傲寒
傲寒 2021-02-13 10:26

I am using custom implementation of microsoft asp.net identity because i have custom tables that is why i have given custom implementation of all my methods IUserStore a

8条回答
  •  不知归路
    2021-02-13 10:45

    I had the same problem and I was really confused because without any reason user was redirected to login page means that he wasn't authorized. I had changed the timeout to more than 8 hours but nothing was changed. After reading many pages such as Aspnet unexpected logout or frequent-unexpected-user-logoff I found that something is wrong with the machine key and after checking machine key in web.config file I could detect the problem with machine key. By changing the machine key and make it the same with others in Owin section everything is working well.

提交回复
热议问题