P
P
Pr00f2021-04-10 10:44:22
ASP.NET
Pr00f, 2021-04-10 10:44:22

Asp.net why is auth session reset after application restart?

Hello. I am currently learning the asp.net core framework and its authentication system. Created a simple application with authentication and cookies - everything works.
But if you restart the application, then the user authentication is reset. Why is this happening (after all, all the data is already stored in my cookies)? Is there any user data stored in memory? Or are some data for decrypting cookies changing? And there are some materials on this subject, where the authentication mechanism is described in detail?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pr00f, 2021-04-11
@Pr00f

Found the reason - all because of inattention. TicketStore was configured to be in-memory, only the ID was stored in the cookie, and all data was in-memory on the server.

C
cicatrix, 2021-04-10
@cicatrix

Typically, authentication occurs when a session is established, the state is set as a property of that session. Naturally, after restarting the application, the sessions are new and the authentication cookie must be checked again.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question