문제

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.

도움이 되었습니까?

해결책

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).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top