I have a MVC 4 app where I'm using SignalR and a dependency injection framework. Thus, I needed to implement a custom DependencyResolver. In order to wire it up, I'm using
var resolver = new CustomSignalRDependencyResolver(...);
GlobalHost.DependencyResolver = resolver;
app.MapSignalR();
and everything works as expected. However, if I use a HubConfiguration object like this:
var resolver = new CustomSignalRDependencyResolver(...);
app.MapSignalR(new HubConfiguration(
{
Resolver = resolver
});
everything seems to work (the objects are correctly wired-up, there are no errors or warning whatsoever) but the remote methods are not invoked anymore. Can someone explain the difference between the first and the second approach?