Shachaf.Gortler
Shachaf.Gortler

Reputation: 5745

Hub context out side of hub in self hosted signalR application

Hello I'm setting up a self hosted hub as explained here

I created my own Hub class QRCRServiceHub : Hub { }

out side of the Hub, at some other server side I try this GlobalHost.ConnectionManager.GetHubContext<QRCRServiceHub>()

But I get an exception "QRCRServiceHub' Hub could not be resolved"

how can I get the hub context from outside my hub ?

Upvotes: 2

Views: 714

Answers (1)

Shachaf.Gortler
Shachaf.Gortler

Reputation: 5745

Ok this is how I managed to solve it, The solution was to mark the class QRCRServiceHub : Hub { } as public i.e : public class QRCRServiceHub : Hub { }

Upvotes: 3

Related Questions