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.
Asked
Active
Viewed 1,024 times
3
-
1That 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