I realize that these questions are similar:
SignalR - Broadcast to all clients except Caller
Send a message to all clients in a Group, except for the current cl
Your approach does work, however the correct approach is to use the built in API: Clients.Others.addMessage(message)
. Also there's no need to get the hub context inside the hub itself. You can always access the current connection ID via Context.ConnectionId or send message sto clients via Clients.All.foo();
And you cannot set the ConnectinoID programatically. If you'd like to track users across pages maintain a list of users on your server and then just re-assign the connection id's as they navigate through the site.
Here's a post explaining the tracking of users: SignalR 1.0 beta connection factory
If you're sending the message in a method on the Hub class, you can also use Clients.Others to exclude the calling client. You only need to use AllExcept(id) if you're not in a hub method.
See the following for details:
http://www.asp.net/signalr/overview/hubs-api/hubs-api-guide-server#selectingclients