-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Open
Labels
area-signalrIncludes: SignalR clients and serversIncludes: SignalR clients and servers
Description
Hey .NET AspNetCore & Blazor Team,
We love Blazor! Keep up the good work.
We have a question for you about best practice for adding additional SignalR functionality into our existing Blazor Server App?
I am seeing mixed responses online about best practices on this, and need your guidance.
In our Blazor Server app (.NET 9), we have several components that need to refresh the UI when background server processing occurs (e.g., receiving a message, processing background results, message/notification/task count, etc.).
- Should the Blazor Server components use HubConnectionBuilder to connect to the SignalR hub as the logged-in user (via impersonation with Access Token)?
(or)
- Should we NOT use HubConnectionBuilder and instead use the Browser Client (Client Cookies, JavaScript Signal R, with Blazor interop) to process the Signal R events?
The SignalR connection needs to be secure and authenticated (so we can send User-Specific SignalR messages).
What is the best practice here? Or are both options okay to do?
Metadata
Metadata
Assignees
Labels
area-signalrIncludes: SignalR clients and serversIncludes: SignalR clients and servers