Nov 30, 2018 01:42 PM|mgebhard|LINK
This is a pure design question and fundamental state management in ASP.
Session will not wok by itself because Session is unique to the browser instance. You can learn about Session by reading the documentation.
I recommend a database to track the user and the exam(s) they are taking. The table will have at least an exam id, User Id, start date and end date. When the user starts an exam, write a record to the database. When the user completes an exam, set the
If the user has 3 records without an end date then they have reached the max exam limit and cannot start a new exam. I'm assuming they can take 3 different exams at the same time.
All you have to do is check the user's exam state whenever needed. That could be on every request or when the user accesses an exam. This is very simple, assuming that you are using standard ASP.NET security and know the identity of the user.