I want to call specific client from server, and not broadcast to all of them. Problem is that I'm in scope of some AJAX request (in .aspx codebehind let say), and not in Hub or PersistentConnection, so don't have Clients property - and client who made that ajax (jquery) call is not the client I want to send signalr message!
Now, I have one hub that it's called on JS page load, which registers new client into server static list, so I have client Guids. But don't know how to use that to send message from server to specific client.
when you want to send a message to specific id
at server side send the id of the client and response to that id
If the specific user actually is the caller it self, you can use:
See the docs for the latest:
Persistent connections - https://github.com/SignalR/SignalR/wiki/PersistentConnection
Hubs - http://www.asp.net/signalr/overview/guide-to-the-api/hubs-api-guide-server
Every time you send a request to the hub server, your request will have a different connection id, so, I added a static hash table that contains a username- which is not changing continuously, and a connection id fro the signal r,every time you connect, the connection id will be updated
and in the server code: