System.Web.Routing.RouteCollection does not contain a definition for 'MapHubs'
12,938
Maphubs is an extension method to RouteCollection class in SignalR library. You would need to include SignalR references to call MapHubs.
Source:
Author by
cnd
Updated on June 17, 2022Comments
-
cnd almost 2 years
I follow sample from SignalR wiki page and here is my
Global.asax
:<%@ Application Language="C#" %> <%@ Import Namespace="System" %> <%@ Import Namespace="System.Web.Routing" %> <script runat="server"> void Application_Start(object sender, EventArgs e) { // Code that runs on application startup RouteTable.Routes.MapHubs(); }
But I'm getting:
'System.Web.Routing.RouteCollection' does not contain a definition for 'MapHubs' and no extension method 'MapHubs' accepting a first argument of type 'System.Web.Routing.RouteCollection' could be found (are you missing a using directive or an assembly reference?) \Global.asax 11
What am I doing wrong?