venkat

venkat

  • NA
  • 138
  • 49.2k

global.aspx iam getting error

Nov 16 2016 9:48 AM
i am getting error in my global.asax file. this is having both MVC and API. i am not understanding why it is showing error . please help me very urgent.
 
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional }
);
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
 

Answers (1)