MVC Catch Entire route broken.
My first route:
// Should work for /Admin, /Admin/Index, /Admin/listArticles
routes.MapRoute(
"Admin", // Route name
"Admin/{action}", // URL with parameters
new { controller = "Admin", action = "Index" } // Parameter defaults
);
does not resolve the route (I am using Phil Haack Route Debugger ) and even the last route, the Catch All route does not work
//Maps any completely invalid routes to ErrorController.NotFound
routes.MapRoute("Catch All", "{*path}",
new { controller = "Error", action = "NotFound" }
);
If I go to /Admin/listArticles
, it works, but /Admin
gives me Error 403.15 "The Web server is configured to not list the contents of this directory."
Does this point me to the idea that routing is not being used as it is looking for a physical file in a directory?
This is a simple low level route problem, but I can't get it to work and everyone gives me read links (yes, I know MSDN is there), but no real answers. I researched routes and tried, but I post this because I can't get it to work, any help, answers?
source to share
Are you using IIS 6.0? If so, you will need to look ...
// Should work for /Admin, /Admin/Index, /Admin/listArticles
routes.MapRoute(
"Admin", // Route name
"Admin.mvc/{action}", // URL with parameters
new { controller = "Admin", action = "Index" } // Parameter defaults
);
Where do you need to install mvc as application extension
source to share