I'm using signalR to build a real-time website. I have 2 hub:
- NotificationHubCore
- NotificationHub (inherits NotificationHubCore)
My solution includes 2 small projects : Domain & Web. I put NotificationHubCore in Domain, NotificationHub in Web.
Now, in the web section, I want to acess NotificationHubCore by using :
GlobalHost.ConnectionManager.GetHubContext<NotificationHubCore>();
It always returns null to me.
My question is : how can I access to NotificationHubCore through NotificationHub.
I've tried:
var notificationHub = new NotificationHub();
GlobalHost.DependencyResolver.Register(typeof(NotificationHubCore), () => notificationHub);
But that way didn't work.
Can anyone help me please?
Thank you,