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.
Azure SignalR Service: No active connection for user
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
1 answer
Sort by: Most helpful
-
Hendrik Bulens 6 Reputation points
2023-04-05T09:44:54.8866667+00:00