c# - Multiple website server side Clients.All.receiveNotification challenge with SignalR -


so have 2 websites using signalr , have following in both global.asax files:

hubconfiguration hubconfig = new hubconfiguration(); hubconfig.enablecrossdomain = true; routetable.routes.maphubs(hubconfig); 

i have server side event side , hub context send message listening clients:

 var signalrcontext = globalhost.connectionmanager.gethubcontext<notifications.offerhub>(); signalrcontext.clients.all.receivenotification("hello world"); 

the same event happens server side on both websites , broadcast cross-domain listening clients. thinking not possible server side because not able hubcontext both websites change hub.url server side.

unless has other suggestions?

well, took me minute realize here. david fowler , signalr awesomeness! ended adding servicereference in each website web service in other website , calling "broadcast" webmethod. web service webmethod gets current signalr context , broadcasts message clients listening on respective website.


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -