Click here to Skip to main content
15,356,640 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I'm creating an ASP.NET Core MVC application and I want that on the Homepage the user will be required to enter his/her CNIC (Identity Card) number.

After that, he'll be able to navigate to any page on the application. But if he/she is idle for 5 minutes or more then after 5 minutes if he/she tries to perform any action means to try to go to any other page then he/she will be redirected to "Homepage" and is required to enter his/her CNIC number again.

How can I implement this functionality using Sessions in the an ASP.NET Core MVC application?

Thank you

What I have tried:

I tried using sessions, but can't get the logic done
Posted
Updated 6-Mar-22 21:25pm

1 solution

There are tons of article present on Internet that explains how to set session timeout. One of the article doing same is provided for you.

Set Session Timeout in ASP.Net Core[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900