0

I am developing an web application using MVC 5 and C# and I need to avoid that an user logged in at multiple devices at the same time. I have looking information for few days but I did not get nothing. Please if someone has any recomendation would be great.

I have tried to use Signal R and every time a user log in add it to a list with the nicknames and check that list when a user tries to log in, but do not know if is the best option.

paulsm4
  • 114,292
  • 17
  • 138
  • 190
  • 2
    did u checked [this](https://stackoverflow.com/questions/2599118/in-asp-net-site-how-to-prevent-multiple-logins-of-same-user-id) ? – Ali Zeinali Dec 27 '18 at 19:38
  • Your question isn't quite clear. What it sounds like you are saying is *prevent multiple users from being logged in at once*, which the positive would be *only allow one person to log in at a time*. I think what you mean is *allow a user to only be logged into a single browser at a time*? At the moment the question is not answerable because we don't know what authentication you are using (FormAuthentication, WebSecurity, Identity... etc) – Erik Philips Dec 27 '18 at 19:38
  • @ Erik Philips - I thought the same thing. I updated the title accordingly. Ali Zeinali - I agree: this same question was asked/answered here: [In asp.net site how to prevent multiple logins of same user id?](https://stackoverflow.com/questions/2599118/in-asp-net-site-how-to-prevent-multiple-logins-of-same-user-id) – paulsm4 Dec 27 '18 at 19:38
  • Sorry if I was not enough clear, thank for your recemendations and I try to be clearer – Esteban Silva Dec 27 '18 at 19:46

0 Answers0