SignalR 2 connection not being persisted -


i've set sample signalr hub, chathub, added list of connections. when runs onconnected see being add list. when open page in browser (expecting list have 2 connections see 0 connections in list). chathub instantiated per request?

    list<string> connections = new list<string>();     public override task onconnected()     {         connections.add(context.connectionid);         return base.onconnected();     } 

yes hub instance created each request.

specifically:

you don't instantiate hub class or call methods own code on server; done signalr hubs pipeline. signalr creates new instance of hub class each time needs handle hub operation such when client connects, disconnects, or makes method call server.


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -