I have a question, I hope you can help me, thanks in advance.
I am working on a project, a WEB application hosted on IIS; the approach is that I have a LogIn for the users, but the LogIn must allow a user to log in at the moment, so if two users try to access the site at the same time, only one must access, while the other waits until the first one is connected. I thought about using threads, with a declaration of lock () in the login validation, but I do not know if It is good practice to use threads in this scenario, because several users they can try to log in at the same time, and only one must access the time. Also, I need to have a registry for the users in the order in which have accessed the site, to verify that two users did not access it time.
Is multithreading a good practice or recommendation to do this? Any suggestions? Thank you very much.