I recently partially converted an Asp.Net web form application to use MVC. We still have parts of the application in web forms (.aspx pages) and use MVC routing to work with controllers, etc. I added an MVC route, for example
routes.MapRoute("Users", "Users/{controller}/{action}/", new { controller = "Timesheet", action = "List" });
There is a folder called Users, which contains several aspx pages that we still use. When I click the URL http://localhost/Users/ , I get a list of directories for the contents of the Users folder. Apparently, the directory list takes precedence over the routing of the MVC URL, and this can be overridden by changing the IIS7 server settings.
How can I override this behavior using code changes or web.config?
Literature:
http://forums.asp.net/t/1251156.aspx/1
http://learn.iis.net/page.aspx/121/iis-7-and-above-modules-overview/
asp.net-mvc webforms asp.net-mvc-routing
prabug
source share