disconnect client from server side signalr

后端 未结 6 1359
梦如初夏
梦如初夏 2021-02-19 06:39

I\'m using SignalR 1 with MVC4 C# web application with form authentication. I have a code in my layout page in JavaScript :

$(documnet).ready(function(){
               


        
6条回答
  •  自闭症患者
    2021-02-19 07:03

    You cannot stop and start SignalR connections from the server. You will need to call

    $.connection.hub.stop(); //on the client before the user attempts to log on and then call 
    $.connection.hub.start(); //after the log on attempt has completed.
    

提交回复
热议问题