For some reason my routing is ignoring any attempt to access my MVC pages and simply giving me 404s. I have a WebForms app set up like the following:
Virtual Directory: thing
So I usually access my site like so:
The original stucture of my ASP.NET WebForms app mirrors the file system so I have folders full of .aspx files and I need to be able to use them like that. For some reason when I try to access a page using the MVC routing such as:
I just get a 404 error. I have used ASP.NET MVC on it s own and I know that even if I didn t set up my folders properly, I wouldn t get a 404. I would get the reasons why the page couldn t be found and hints to where the files should be. Below is my routing info. Where am I going wrong?
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.IgnoreRoute("{resource}.aspx/{*pathInfo}");
routes.MapRoute(
"Default",
// Route name
"{controller}/{action}/{id}",
// URL with parameters
new { controller = "Home", action = "Index", id = "" }
// Parameter defaults
);
}
protected void Application_Start()
{
RegisterRoutes(RouteTable.Routes);
}