2
Answers

How can I get the current signalR ConnectionId from outside of the hub

Hi all,

I'm trying to get the current signalR ConnectionId from the current user when he logs in the server, so I can keep track on the database if the user is currently (Identity user) connected or not. I don't find a way to get the current connection on the login.cshtml.cs "code behind" class.. I tryied to inject the IHubContext, but it's not working... it doesn't expose the method get the current ConnectionId. 

. I'm using .net core 5.

Somebody help me please!! 

Thanks in advance.

Answers (2)