Azure SignalR Service: No active connection for user

Hendrik Bulens 6 Reputation points
2023-04-03T10:47:42.3133333+00:00

In the live trace tool on the Azure portal, I consistently get the message that the ‘user message was not received because there’s no active connection for user XXX’.

I'm using a custom IUserIdProvider in my ASP.NET Core app. When I use the default, in-memory functionality of SignalR, this works like a charm. However, with Azure SignalR Service, there seems to be a mismatch between connections and User IDs.

A connection is made, but this doesn’t seem to find its way back to Azure SignalR service, because the other User IDs shown in the trace cannot be traced back to our code. The result of that is that no message ever arrives in the users’ browsers. In the screenshot attached, the user IDs in the first two lines seem to be auto-generated by Azure SignalR Service, while the third row indicates a user id in our app. Hence the warning message that there aren't any active connections for that user.

Not much fancy is going on in our app in terms of SignalR config:

services
.AddSignalR()
.AddAzureSignalR(signalRConnString);
services.AddSingleton
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,238 questions
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. Hendrik Bulens 6 Reputation points
    2023-04-05T09:44:54.8866667+00:00

    I think I may have found the culprit. Could it be the result of a lingering option that set SkipNegotation to true? After removing this option, it seems to be working well.

    1 person found this answer helpful.
    0 comments No comments