sampath kumar
sampath kumar

Reputation: 1

persistant ConnectionId of Signalr in Refresh

I'm trying to build a chat engine whereby users id are represented by their connection id. On page refresh, the connection id changes when a new connection is instantiated. Is there a way to persist the state of the connection id of a user until he closes the browser (i.e until he ends his session on client)., plz provide me solution. thanks

Upvotes: 0

Views: 296

Answers (1)

xleon
xleon

Reputation: 6375

By design, SignalR will assign a new connection id to every new connection, so connection ids cannot be reused.

To achieve what you want, you should authenticate your users so they can be "represented" in your client by their actual id (user id rather than connection id)

Upvotes: 1

Related Questions