ASP.NET 5 Identity 3 users get signed out after application restart

人盡茶涼 提交于 2019-12-12 12:18:38

问题


We are using ASP.NET Identity 3.

Our users are randomly getting signed out automatically. To reproduce this issue, I tried application restart, all users signed out, even those who had checked Remember me.

It only happens in Production, works fine on development environment.

Update:

We have only one server in production.


回答1:


You will need to configure data protection in the production server. I assume that in your local machine the website runs as a local user so the registry hives can be created and read. While if you run it as a user without a local profile (default IIS app pool user option), it may not have the permission/s to create or read the keys required. You'll need to run this provisioning script in that case.

Have a good read about their guide on Publishing to IIS. That step is documented there.




回答2:


The production machine might be using multiple servers. In that case, the server to which a user first connects might not be the same server to which that user later connects. In that case, if you are using session IDs, you must keep user sessions in sync across servers.



来源:https://stackoverflow.com/questions/36844817/asp-net-5-identity-3-users-get-signed-out-after-application-restart

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