Those of you who have used signalR from it’s first version and
hosted it on web application, probably know that they have to call
the MapHubs extension method of RouteCollection, as shown here:
Those of you who has started trying out signalR version 2.0 must
have noticed that the extension method has gone. Instead you
have to do the following:
1. Create a class named <Hubs assembly name>.Startup
2. Create a method named Configuration within this class accepting an
Owin.IAppBuilder as a parameter.
3. Inside the method implementation you may call the MapHub method
of the IAppBuilder
The entire class should look like that:
This makes the web-application-hosted and self-hosted signalR application
startup code looks the same. In self-hosted signalR you still need to call this
class, but that might be the only difference.