Azure SignalR service connection failed with C# Client

Girish Lokhande 1 Reputation point
2020-12-08T17:43:21.977+00:00

My Azure SignalR (serverless mode) service connection getting failed with C# (4.8 .netFramework). My console application consumes Microsoft.AspNet.SignalR.Client and it's dependencies.

Console applicaton code

    private static JwtSecurityTokenHandler jwtTokenHandler;  
    private static HubConnection hubConnection;  
    private static IHubProxy hubProxy;  

static async Task Main(string[] args)  
        {  
            jwtTokenHandler = new JwtSecurityTokenHandler();  
            var serviceUrl = "https://{MyProjectName}.service.signalr.net/client/";  
            var accessKey = "b5Lyzxb+jHzAIb67Sw2+l6BcSArPl57894wreR7I9BtlE=";  
            var hubName = "chathub";            
            var querystringData = new Dictionary
Azure SignalR Service
Azure SignalR Service
An Azure service that is used for adding real-time communications to web applications.
122 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Lex Li (Microsoft) 4,742 Reputation points Microsoft Employee
    2023-04-02T06:19:53.9233333+00:00

    This is expected, as the Microsoft.AspNet.SignalR.Client can only connect to traditional SignalR hubs built upon ASP.NET 4.x. However, Azure SignalR Service is built upon ASP.NET Core SignalR and not compatible with the old client library.

    To subscribe to hubs on Azure SignalR Service, you need to use the new library, https://www.nuget.org/packages/Microsoft.AspNetCore.SignalR.Client

    0 comments No comments