Search code examples
c#asp.netasp.net-coreasp.net-identity-3

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


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.


Solution

  • 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.