Forum Discussion

joens_haji's avatar
joens_haji
Copper Contributor
Nov 11, 2024

Use background Service With SignlarR In Blazor

i use blazor webassemly .net 8
i want every 5 sec send time to all clients
this is my project

https://github.com/jones1995wm/SendTime

but when i navigate to /chat page component this code send time to all users
await _clockHub.Clients.All.ShowTime(DateTime.Now);

but not called the hubConnection.On("ShowTime")
and dont update ui (foreach)
why ?

i use this https://learn.microsoft.com/en-us/aspnet/core/signalr/background-services?view=aspnetcore-8.0

how to use timer or background service with signalR in blazor to send time every 10 second

No RepliesBe the first to reply

Resources