I've recently had the same issue whereby the negotiation worked with map.RunSignalR(...)
but not map.RunAzureSignalR(...)
and tried the accepted answer here without resolution. For anyone still experiencing this issue having tried the accepted answer like myself, I found the below to work for a .NET Framework 4.6.1
project.
Navigating to the negotiation link (e.g. .../signalr/negotiate?clientProtocol=2.1&connectionData=...&callback=jQuery...&_=...
) in the browser would give a
HTTP 500: Azure SignalR Service is not connected yet, please try again later
Having enabled the exception debugging suggestions from @Youp Hulsebos and the SignalR GitHub (source), I was able to find the following exceptions being thrown from the SignalR registration call in Startup.Configure(...)
:
Microsoft.Azure.SignalR.Common.ServiceConnectionNotActiveException: 'The connection is not active, data cannot be sent to the service.'
LoaderException - Method 'get_Features' in type 'Microsoft.AspNetCore.Http.Connections.Client.HttpConnection' from assembly 'Microsoft.AspNetCore.Http.Connections.Client, Version=1.0.0.0, Culture=neutral' does not have an implementation.":"Microsoft.AspNetCore.Http.Connections.Client.HttpConnection"
Having found the second of these exceptions and applying some Google-fu, I found this GitHub issue discussing the LoaderException
from Microsoft.Azure.SignalR.WebSocketConnectionContext
discussing this as the result of upgrading Microsoft.AspNetCore.Http.Connections.Client
from 5.0.12.0
to 6.0.0.0
.
Having tried downgrading the package to 5.0.12.0
, I still encountered the same issue. Having checked the linked issue ([dotnet/aspnetcore#38699]
), I downgraded the following packages to 5.0.11.0
and this resolved the issue:
Microsoft.AspNetCore.Connections.Abstractions
Microsoft.AspNetCore.Http.Connections.Client
Microsoft.AspNetCore.Http.Connections.Common
Microsoft.AspNetCore.Http.Features