I'm trying to use ASP.NET MVC with older versions of IIS that have trouble with MVC's default routing. I found a suggestion to add .mvc.aspx
to my routes. So instead of this:
routes.MapRoute( _
"Default", _
"{controller}/{action}/{id}", _
New With {.controller = "Home", .action = "Index",
.id = UrlParameter.Optional} _
)
I now use this:
routes.MapRoute( _
"Default", _
"{controller}.mvc.aspx/{action}/{id}", _
New With {.controller = "Home", .action = "Index",
)
This works at getting MVC to work on older versions of IIS. However, when I navigate to http://win2k3machine/MyMVCApplication/
, I get "Directory Listing Denied" message. Similarly, when I use Casini (Visual Studio's development web server) and navigate to http://localhost:2019
, I get a "Server Error in '/' Application." message.
What do I need to change in IIS and/or my MVC application to get the default page to work correctly?
NOTE: I tried adding RouteTable.Routes.RouteExistingFiles = True
per this answer, but that didn't seem to fix the problem.