Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
1.44/5 (2 votes)
See more:
C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;

namespace Chatapp
{
    // Note: For instructions on enabling IIS6 or IIS7 classic mode,
    // visit http://go.microsoft.com/?LinkId=9394801

    public class MvcApplication : System.Web.HttpApplication
    {
        protected void Application_Start()
        {
            RouteTable.Routes.MapHubs();
            AreaRegistration.RegisterAllAreas();

            WebApiConfig.Register(GlobalConfiguration.Configuration);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            AuthConfig.RegisterAuth();
        }
    }
}











////I got the error RouteTable.Routes.MapHubs(); this line How to rectify this error please help me....
Posted

1 solution

You can refer the following link to broadcast the message to clients using the MVC 5:

SignalR Use in MVC 5
 
Share this answer
 
Comments
ilaya muthumanickam 26-Feb-14 0:30am    
Thanks for your reply this link is very helpful for me.......
Nimit Joshi 26-Feb-14 0:32am    
Its my pleasure..Please vote the answer and if that article helps you that add a comment there
ilaya muthumanickam 26-Feb-14 0:45am    
Error 1 'System.Web.Routing.SignalRRouteExtensions.MapHubs(System.Web.Routing.RouteCollection)' is obsolete: 'Use IAppBuilder.MapSignalR in an Owin Startup class. See http://go.microsoft.com/fwlink/?LinkId=320578 for more details.' E:\Modules\Chatapp\Global.asax.cs 22 13 Chatapp
ilaya muthumanickam 26-Feb-14 0:46am    
The above error is comming repetedly...
Nimit Joshi 26-Feb-14 0:54am    
Check your Global.asax file that the MapHub() is routed or not?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900