How to send SignalR message to specific user by UserId
See original GitHub issuei have learnd alot using this … and i started using aspnetboilerplate in my work (universty system) i should say thank u for this great job
i am trying to send signalr message using userid
i can send using this and it work fine :
await Clients.All.SendAsync("getMessage", "test message text");
but nothing received when i try this … my code :
public async Task SendMessage(string message){
var r = _onlineClientManager.GetAllByUserId(new UserIdentifier(null, 10002));
var rr = r.Select(x => x.ConnectionId).ToList();
await Clients.Clients(rr).SendAsync("getMessage", "test message text");}
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
SignalR - Sending a message to a specific user using ...
In the latest version of Asp.Net SignalR, was added a new way of sending a message to a specific user, using the interface...
Read more >Send message to specific user in SignalR
Today post I will write small demo to demonstrate how to send message to specific user using their connection id in SignalR.
Read more >How to send notification to specific user's using custom ...
What you need to do when you create the JWT is to add a claim for ClaimTypes.NameIdentifier with the value of the UserId....
Read more >Mapping SignalR Users to Connections
Single -user groups ... You can create a group for each user, and then send a message to that group when you want...
Read more >C# – How to Send Message To specific User with signalR
You can send broadcast message to all Users without connection id. You just need to assign a Unique ID to Every user and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Finaly ! I did it by using
and i can send it to list of users Clients.Users( List<string> userIds)
I don’t need connectionsIds list for the users who I will send the message for sorry about my English $:
So, why do you ask it here ? You can create an issue on https://github.com/abpframework/abp