Killing SignalR cross domain connection -


i'm not entirely sure how ask question, here's situation:

  1. we have single-page application connects signalr hub uses cors cross domain authentication
  2. the user connects hub , leaves browser window open
  3. we delete user, since connected hub, anytime go page (without reloading), hub reconnects
  4. restarting iis has no effect

so that's situation , think understand why it's happening, don't know best practice keeping happening in future (i thought expiring session since single page application long don't refresh, it'd never call session timeout).

is there easy way server side kill connection (we log connections have connection ids, etc)?

thanks guidance! i'm stuck.

you cannot stop connection server side. stop connection, need call $.connection.hub.stop(); client side

one way stop connection create function in client side, call server

client side

myhub.client.serverwantdisconnect = function (value) {     $.connection.hub.stop(); }; 

server side

clients.client(context.connectionid).serverwantdisconnect(); 

Comments