Last post Jul 16, 2017 09:46 AM by Kubinho1032
Jul 14, 2017 04:06 PM|Kubinho1032|LINK
Is SignalR proper for multi-page ASP MVC real time nofitications? I need to create something like Facebook notifications (record updated in db - proper user are being notificated about it).
But it has problem with OnChange event, which fires up multiple times. I think that's problem with page navigation - one user open main page, then redirect to other so just now 2 dependency listeners are added to that user Am I right? Im talking about this
var dependency = new SqlDependency(command);
dependency.OnChange += new OnChangeEventHandler(dependency_OnChangeAcceptedGames);
It fires up on any page load. And I want you to ask about any solutions.
Can it be solved with assigning cookies for example so if user has already registered listener it wont register once again?
If You need some code example to cosider it just let me know.
Please give my any advice, thanks
Jul 14, 2017 05:47 PM|JBetancourt|LINK
handle the OnDisconnectedEvent
Jul 16, 2017 09:46 AM|Kubinho1032|LINK
I got it by following this article:
My problem was casting on every page load function, which add sql dependency listener. In this article I found solution, how to avoid it.