Works:
- http://localhost/ApplicationName/Home/Index
- http://localhost/ApplicationName/
- http://localhost/ApplicationName/AnotherController/
404 Error:
I have an Index view for my Home controller and an Index action. Everything was working fine, then I refactored and changed the application name. Now only the Home controller won't default to the Index view when the action is left out
Here's my RegisterRoutes in Global.asax:
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}