Cannot set default route for MVC project

I cannot set a default route for my MVC project. When I run the project, it goes to the address http: // localhost: 7555 / and it gives "HTTP ERROR 404", but if I enter the url http: // localhost: 7555 / Default , it goes to the default page. But I want users to go to the default page, even if they are not in http: // localhost: 7555 / Default .

here is my route at Global.asax

routes.MapRoute(
            "Default", // Route name
            "{controller}/{action}/{Filtre}", // URL with parameters
            new { controller = "Default", action = "Index", Filtre = UrlParameter.Optional } // Parameter defaults
        );

what should I do?

+1
source share
1 answer

, , HomeController, . DefaultController - :

routes.MapRoute(
    "Default", 
    "{action}/{Filtre}", 
    new { controller = "Default", action = "Index", Filtre = UrlParameter.Optional } 
);
+1

Source: https://habr.com/ru/post/1598060/


All Articles