I had an ASP.NET MVC4 application with the following routing defined in Global.asax.cs. The application start page is an index.cshtml view that is returned from the Index () action method of the main controller. Then I added an outdated ASP.NET WebForms application in which the start page had Default.aspx. How can I make this Default.aspx page the start page of this embedded MVC + WebForms application:
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default",
"{controller}.mvc/{action}/{id}",
new { action = "Index", id = "" }
);
routes.MapRoute(
"Root",
"",
new { controller = "Home", action = "Index", id = "" }
);
}
source
share