✅ SignalR in .Net 6 Web API

If i am configuring this in program.cs file builder.Services.AddSignalR(); and app.MapHub<SignalRHub>("/signalr"); does this mean it can fire events at all time? I have to keep sending the events to a angular client from a large file upload operation.
12 Replies
OneDeveloper
OneDeveloperOP2y ago
I am sending the events like await hubContext.Clients.All.SendAsync("SendProgressEvent",signalRDto); Configured SignalRHub class as singleton in program.cs
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
OneDeveloper
OneDeveloperOP2y ago
No i want to send the fileprogress to angular client I am uploading the file to Azure Blob
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
OneDeveloper
OneDeveloperOP2y ago
My SignalRHub class implement Hub And I have injected IHubConext as part of DI
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
OneDeveloper
OneDeveloperOP2y ago
its working fine But its not consistent
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
OneDeveloper
OneDeveloperOP2y ago
Okay Thanks for you input I will try this. its a organizational project so can't share the code base Really appreciate your input!
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
OneDeveloper
OneDeveloperOP2y ago
Doing the same!
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server