Technology: MVC, WEB API , .NET
Steps:
Steps:
- Open the web API solution.
- expand folder named "App_Start"
- Open file named "RouteConfig"
Replace below method:
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}