0
votes

Works:

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 }
    );

}
1
There was an empty folder in the application root named Home. The application was going there first for the view. Deleted it, problem solved.Crazd
since you solved the problem, you should post that as an answer, then accept it (in a couple days, when you are able to).Kyle Trauberman

1 Answers

0
votes

There was an empty folder in the application root named Home. The application was going there first for the view. Deleted it, problem solved.