0

I receive the following error for the code below:

_hub = new HubConnectionBuilder()
    .WithUrl("https://MY_AZURE_FUNCTION.azurewebsites.net/api")
    .Build();

await _hub.StartAsync(); // ERROR OCCURRS HERE

'Response status code does not indicate success: 500 (Internal Server Error).'

Log Stream provided the following details:

2021-07-08T16:17:04.786 [Error] Executed 'negotiate' (Failed, Id=dcca623f-f851-4352-a35d-a12567d2f8bb, Duration=26ms)System.InvalidOperationException : The SignalR Service connection string or endpoints are not set.at Microsoft.Azure.WebJobs.Extensions.SignalRService.ServiceManagerStore.<>c.

My Configuration is the following:

enter image description here

Where else would I set the SignalR connection string?

Scott Nimrod
  • 11,206
  • 11
  • 54
  • 118

1 Answers1

-1

You might have put the connection string setting in the client project, while it should be in the hub project https://MY_AZURE_FUNCTION.azurewebsites.net/api

LarryX
  • 591
  • 2
  • 7
  • I'm don't understand. Can you elaborate? – Scott Nimrod Jul 19 '21 at 13:29
  • 1
    _hub = new HubConnectionBuilder() ... is your client code which seems to be an azure app service. your Hub is in the azure function MY_AZURE_FUNCTION.azurewebsites.net/api and the conntectionstring to signalr service should be set here: func settings add AzureSignalRConnectionString '' Please following this link:https://learn.microsoft.com/en-us/azure/azure-signalr/signalr-quickstart-azure-functions-csharp – LarryX Jul 19 '21 at 16:05