I began to run into errors when my session was lost, or when restoring my project, as my authentication cookie still lives.
In WebForms, I would use a master page associated with pages that require a login to simply verify the session.
How do I do this in one place in MVC? I would not like to check the state of the session in every action in my controllers.
On the other hand, I cannot just apply a global filter, since not all controllers require session state.
Perhaps this is possible in my layout? This is the only thing that pages requiring a session are general.
source
share