I have a working application in asp.net MVC3. Today, when I worked on it in VS2010, I found that none of the actions of a particular controller work. When viewing the controller / action, I get a message not found by the page. I checked all the pages (controller, view). Even if I add a new action to this controller, it will not be called at all. At the same time, the actions of other controllers work fine. I can access the pages. This is pretty weird, and I can't figure it out. Any help?
Edit:
Controller action that does not work, http: // localhost: 7400 / Registration / MedicalHistory / 0
Code from global.asax
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute("error", "error", new { controller = "Home", action = "Error" });
routes.MapRoute(
"Default",
"{controller}/{action}/{id}",
new { controller = "Program", action = "Index", id = UrlParameter.Optional },
new string[] { "ASPNETMVCApplication.Controllers" }
);
routes.MapRoute(
"Admin",
"{controller}/{action}/{id}",
new { controller = "Program", action = "Index", id = UrlParameter.Optional },
new string[] { "ASPNETMVCApplication.Areas.Admin.Controllers" }
);
}
Health Care Action:
[HttpGet]
public ActionResult MedicalHistory(int id = 0)
{
return View()
}
source