You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Microsoft.AspNetCore.SignalR.HubException: 'Unable to complete handshake with the server due to an error: SignalR Service is now in 'Default' service mode.
/mysignalrhub is your web server path to serve your hub requests, it does not need to be the name of the class implementing the hub.
Your sample code fails because it connects to Azure SignalR directly and it reuses the variable SignalRHubName that your local path uses as the hub name.
In your sample code, there is no need for your web page Counter.razor to be aware of Azure SignalR endpoints, your web page still new HubConnectionBuilder().WithUrl("your web server url"), under the hood, your app server side, when receives the client negotiate requests, would redirect the client to connect with Azure SignalR. For the detailed workflow, please see https://learn.microsoft.com/en-us/azure/azure-signalr/signalr-concept-internals#client-connections
Describe the bug
Hub name used in Azure SignalR Service is the name of the hub class in lowercase and not the hub name it was mapped with
To Reproduce
I have attached the sample to the bug report.
The system only works if the path provided for the hub is the name of the class implementing the hub !!!
if your signalR hub class if called MySignalRHub, the name to provide for the hub name path has to be "/mysignalrhub"
Exceptions (if any)
Microsoft.AspNetCore.SignalR.HubException: 'Unable to complete handshake with the server due to an error: SignalR Service is now in 'Default' service mode.
SignalR Sample.zip
Further technical details
Your Azure SignalR SDK version => Latest (1.21.2)
Your Server ASPNETCORE version or Assembly version of
Microsoft.AspNetCore.SignalR
Latest (7.0.3)Your SignalR Client SDK version Latest (1.21.2)
The text was updated successfully, but these errors were encountered: