3

I need to get all active sessions, actually, I want to show logged in users. I visited this page Get a list of all active sessions in ASP.NET but it does not work for me. It seems it does not work in Asp.Net core 2.

Alireza Mn
  • 171
  • 1
  • 3
  • 12
  • 1
    That question is from 2012 and is referencing ASP.NET (ASP.NET Core did not exist at the time). As such, it has no relevance here. Regardless, that was more of a hack than an actual solution. Long and short, there's no built-in way to get all logged in users, since the user's state of being logged in or not is stored client-side as a cookie, not at the server. You'll need to keep an external log or record of logins you can reference later for this info, but that's all on you. – Chris Pratt Feb 19 '19 at 20:58
  • I know that, but, they both have something in common. So you mean I should save users information in a static class or a database and something like these? – Alireza Mn Feb 20 '19 at 22:54

0 Answers0