Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

329
Views
Is there a way to get realtime logged in users in Asp.net zero public site (Asp.net MVC)?

I am making a web application using Asp.net zero [version 10.2.0] with ABP Framework version 6.2 Frontend is in Angular 11 & Backend APIs in Asp.net core 5.0 whereas Public website is in Asp.net MVC.

I am trying to fetch logged in users on both frontend(Angular) as well as public(Asp.net MVC) website using SignalR to show it on admin dashboard. Both are using same db table ABPUsers. Does anyone have done similar thing using SignalR or other way ?

Any help appreciated

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I did something similar with SignalR on ASP.NET (not Core). I overloaded the OnConnected and OnDisconnected methods in the Hub class to keep my own Dictionary of connected clients.

Each client has a header with their login information. In OnConnected, I would parse the header and check if this client is already connected. If they are not, I would add them to the dictionary. In OnDisconnected, I would check if this client is connected and if they are, remove them from the dictionary. This way, the dictionary always has the connected clients.

Note: because a new Hub is created for every new login, the dictionary has to be a singleton or static. I use a static ConcurrentDictionary.

Note 2: SignalR has an internal structure for storing all clients but it is not possible to easily search without modifying the library and has very limited public methods. This is why I used my own Dictionary.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!