signalR generating different ID for various instances

烂漫一生 提交于 2019-12-04 09:09:32

If user is authenticated you can store different connectionIds in the HashSet. The key for the HashSet will be the user's name.

http://www.asp.net/signalr/overview/signalr-20/hubs-api/mapping-users-to-connections

You can use this method even if you are not authenticated. In this case you can use SessionId instead of username.

EDITED:

I have found another method. In this article Alex Ford advices to limit your connections to 3.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!