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?
, , HomeController, . DefaultController - :
HomeController
DefaultController
routes.MapRoute( "Default", "{action}/{Filtre}", new { controller = "Default", action = "Index", Filtre = UrlParameter.Optional } );
Source: https://habr.com/ru/post/1598060/More articles:How to start RServe with library preloading - rAngular - ng-disabled active / inactive - angularjsWhat is a good "template" synthesis of a Joss script? - yosysWebSocket support closes cause from Dart WebSocket server - dartmd-list with more than one md secondary action - angularjsHow do you register paired parts of the steering wheel using a browser? - handlebars.jsChartJS: Uncaught TypeError: Unable to read the 'call' property from undefined - javascriptHow do you conditionally include a structure in an Xcode project? - objective-csorting lines of a python file - pythonSDN4 - Updating a child of a relationship relationship removes the relationship - neo4jAll Articles