Vra

At connect time, I map the clientID to other client and subscription info which I build in a static variable. This works fine until the app pool recycles or I recompile and then I lose my mappings.

Client connections persist after the app pool recycle, but I am not seeing anything in either the OnConnectAsync() or OnReceivedAsync() methods.

I see in Firebug that a new POST is being submitted by my clients every 4 minutes. Is there some SignalR event that I can override to capture the incoming POST and rebuild my client mapping for the current persistent connections?

Thanks.

Was dit nuttig?

Oplossing

Make sure you're using SignalR 0.4. You can handle OnReconnectedAsync.

https://github.com/SignalR/SignalR/wiki/PersistentConnection

DISCLAIMER: If you store your application state in static variables it will never be able to scale out on a farm (but maybe you don't care).

Gelisensieer onder: CC-BY-SA met toeskrywing
Nie verbonde aan StackOverflow
scroll top