0

We are in the process of evaluating Azure SignalR Service to potentially replace our current local SignalR service. We are using .Net Core 2.2.402

We tried the following:

services.AddSignalR();
services.AddSignalR().AddAzureSignalR(Configuration["Azure-SignalR:Connection-String"]);

And defined the routes and hubs as follows:

            app.UseAzureSignalR(route =>
            {
                route.MapHub<QueueHub>("/queue");
            });
            app.UseSignalR(route =>
            {
                route.MapHub<MessagesHub>("/message");
            });

Ideally we would like to use both in the same Web App but it seems to work only for one or the other.

1 Answers1

0

When using Azure SignalR, when a client start a connection with the server, your .NET CORE app redirects the connection to the Azure, so the connection is handled using Azure SignalR and you just provide the logic hub itself. And when you do services.AddSignalR().AddAzureSignalR(...) it seems like the first registration that have only signalR is overrided by your second statement and this can be the reason you can not use both.

Kiril1512
  • 3,231
  • 3
  • 16
  • 41