// Source - https://stackoverflow.com/q/79817810
// Posted by Josh, modified by community. See post 'Timeline' for change history
// Retrieved 2025-11-13, License - CC BY-SA 4.0
var signalRConnectionString = configuration.GetValue<string?>(ConfigurationConstants.ConfigurationKeys.SignalR.SignalRConnectionString);
services.AddSignalR(options =>
{
options.MaximumReceiveMessageSize = maximumReceiveMessageSize;
options.EnableDetailedErrors = true;
})
.AddAzureSignalR(options =>
{
options.ConnectionString = signalRConnectionString;
});
...
app.MapHub<MessagesHub>($"/{SignalRConstants.Hubs.Messages.HubName}");