signalr Handling Connection Lifetimes On connected

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!


When ever a user connects to your hub, the OnConnected() is called. You can over ride this function and implement your own logic if you need to keep track of or limit the number of connections

  public override Task OnConnected()
        //you logic here

        return base.OnConnected();

Got any signalr Question?