Tuesday, 10 September 2013

How to use two Hubs in signalR one of wich is Cross Domain?

How to use two Hubs in signalR one of wich is Cross Domain?

I have 2 applications, in one of them I have a control panel. From this
control panel I want to know the status of the other application. The
application A have a hub to monitor its status in its control panel. The
application B also have its own hub to provide users in it about its
status. What I'm trying to do is to listen to status on hub B from hub A.
Is it possible? I'm able to listen form hub A alone or from B alone
loading B's hub via AJAX
$.ajax({
url: "http://localhost:62835/signalr/hubs",
crossDomain: true,
dataType: "script",
cache: true,
success: function () {
doStuffWithB_hub();
}});
The problem is that when I load both hubs, I can only listen to hub A. I
can invoke from B but don't get data back when there's a update.
Thanks for the responses.

No comments:

Post a Comment