I'm developing a chat application using signalr and asp.net mvc 4. If a user added for first time - it will assign a connection id and he chat with other clients but if he refreshes his page he will assign a new connection id.
My question is how to maintain the connection id of the user on browser refresh?
Any help will be appreciated.
If a user is added for first time - it will assign a connection id that time you store in Session or some specific static variable if page will refresh that time check Session variable is empty or not if not pass the current id
if(Session["id"] != null )
{
-- use last added id
}
I think this can be help you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With