how to get SignalR user connection id out side the hub class?
There's another way also, you can get connection id into your controller from hub by invoking a method of hub
and you can return the required ID
from there.
Controller Code
var HubContext = GlobalHost.ConnectionManager.GetHubContext<"ChatHub">(); //`ChatHub` can be your Hub NameChatHub HubObj= new ChatHub();var RequiredId= HubObj.InvokeHubMethod();
Code inside Hub
public string InvokeHubMethod(){ return "ConnectionID" //ConnectionID will the Id as string that you want outside the hub}