In addition to DavidG answer .
When you publish a project, the compiled assembly does not have a Properties folder. To solve the problem locally during development, you can set RouteExistingFiles to true so that ASP.NET routing will handle all requests.
public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.RouteExistingFiles = true; routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } ); }
source share