Starting SignalR Hub with two IFrames
I'm having two frames loading 2 different pages in my project. One page will be a main page which remains unchanged and the second page will get changed based on the user navigation from a menu. I want to utilize SignalR on the main page to perform real time updates. Similarly I want to update in some of the pages (not all) which will be loaded in frame 2 on demand. Hence I have started the hub on main page and performing real time updates. How can I call the SignalR functions in the page available in frame 2? Because according the posts i should start the hub only once in my project (i can still do it, but will create a different connection, which I dont want). If I'm trying to utilize the hub function in page 2 without starting the hub I'm getting the error Uncaught Error: SignalR: Connection must be started before data can be sent. Call .start() before .send()
Uncaught Error: SignalR: Connection must be started before data can be sent. Call .start() before .send()
at the client side.
Please help me on how to call the hub methods on page 2 without starting it again. Thanks in advance.
I'm answering my own question. After chatting with experts in JabbR for SignalR, I found out that I have to start the connection on each iframes, no other option available. Please see the Chat history below,
链接地址: http://www.djcxy.com/p/96178.html