I am using dotnet 7 isolated functions
I installed package Microsoft.Azure.Functions.Worker.Extensions.SignalRService
While developing locally, the negiotate function seems to be called.
However, I can not get my web client (angular) to invoke any serverside (SignalRTrigger attributed) functions.
public HostApi(SignalRService signalRService)
{
_signalRService = signalRService;
}
[Function("Negotiate")]
public SignalRConnectionInfo Negotiate([HttpTrigger(AuthorizationLevel.Anonymous)] HttpRequestData req,
[SignalRConnectionInfoInput(HubName = "Hub", UserId = "{query.userid}")] SignalRConnectionInfo signalRConnectionInfo)
{
_logger.LogInformation("Executing negotiation.");
return signalRConnectionInfo;
}
[Function("OnConnected")]
[SignalROutput(HubName = "Hub")]
public SignalRMessageAction OnConnected([SignalRTrigger("Hub", "connections", "connected")] SignalRInvocationContext invocationContext)
{
invocationContext.Headers.TryGetValue("Authorization", out var auth);
_logger.LogInformation($"{invocationContext.ConnectionId} has connected");
return new SignalRMessageAction("newConnection")
{
Arguments = new object[] { new NewConnection(invocationContext.ConnectionId, auth) },
};
}
}
Any ideas on how to solve this?