Ian Nielson
Ian Nielson

Reputation: 103

Signal R Core 1.0.3 - Maintain Connection on Page Refresh

I'm currently building a Core 2.2 application using Signal R Core 1.0.3, and there seems to be no documentation on how to persist the connection or reestablish the connectionId when a user navigates away/back to the page.

Is there a way to re-establish the connection with a known connectionId once stored on the client side? I.E. Store the connectionId as a cookie, then restablish that connectionId if the user refreshes the page, or comes back later?

Upvotes: 1

Views: 1049

Answers (1)

Tony
Tony

Reputation: 20092

As far as I know SignalR dont provide a way to persist connection after page refresh. Every time user use the website they will have different connection id.

So we can store connection id in memory for user to work with signalr

I write small blog here to demonstrate the idea so you can take a look at.

Upvotes: 1

Related Questions