Non-existent Area
diff --git a/test/WebSites/HtmlGenerationWebSite/Startup.cs b/test/WebSites/HtmlGenerationWebSite/Startup.cs
index 12c56332d5..e3d1ae34ea 100644
--- a/test/WebSites/HtmlGenerationWebSite/Startup.cs
+++ b/test/WebSites/HtmlGenerationWebSite/Startup.cs
@@ -25,10 +25,6 @@ namespace HtmlGenerationWebSite
app.UseMvc(routes =>
{
- routes.MapRoute(
- name: "default",
- template: "{controller}/{action}/{id?}",
- defaults: new { controller = "HtmlGeneration_Home", action = "Index" });
routes.MapRoute(
name: "areaRoute",
template: "{area:exists}/{controller}/{action}/{id?}",
@@ -37,6 +33,10 @@ namespace HtmlGenerationWebSite
name: "productRoute",
template: "Product/{action}",
defaults: new { controller = "Product" });
+ routes.MapRoute(
+ name: "default",
+ template: "{controller}/{action}/{id?}",
+ defaults: new { controller = "HtmlGeneration_Home", action = "Index" });
});
}
}
diff --git a/test/WebSites/HtmlGenerationWebSite/Views/HtmlGeneration_Home/Index.cshtml b/test/WebSites/HtmlGenerationWebSite/Views/HtmlGeneration_Home/Index.cshtml
index 1f47b429b9..cc90370e4b 100644
--- a/test/WebSites/HtmlGenerationWebSite/Views/HtmlGeneration_Home/Index.cshtml
+++ b/test/WebSites/HtmlGenerationWebSite/Views/HtmlGeneration_Home/Index.cshtml
@@ -7,10 +7,10 @@
diff --git a/test/WebSites/RoutingWebSite/Startup.cs b/test/WebSites/RoutingWebSite/Startup.cs
index a4f35a7f5c..15b3f6170f 100644
--- a/test/WebSites/RoutingWebSite/Startup.cs
+++ b/test/WebSites/RoutingWebSite/Startup.cs
@@ -24,18 +24,21 @@ namespace RoutingWebSite
app.UseMvc(routes =>
{
- routes.MapRoute("areaRoute",
- "{area:exists}/{controller}/{action}",
- new { controller = "Home", action = "Index" });
-
- routes.MapRoute("ActionAsMethod", "{controller}/{action}",
- defaults: new { controller = "Home", action = "Index" });
+ routes.MapRoute(
+ "areaRoute",
+ "{area:exists}/{controller}/{action}",
+ new { controller = "Home", action = "Index" });
routes.MapRoute(
"products",
"api/Products/{country}/{action}",
defaults: new { controller = "Products" });
+ routes.MapRoute(
+ "ActionAsMethod",
+ "{controller}/{action}",
+ defaults: new { controller = "Home", action = "Index" });
+
// Added this route to validate that we throw an exception when a conventional
// route matches a link generated by a named attribute route.
// The conventional route will match first, but when the attribute route generates
diff --git a/test/WebSites/WebApiCompatShimWebSite/Startup.cs b/test/WebSites/WebApiCompatShimWebSite/Startup.cs
index 3a86f8427b..aaf6483151 100644
--- a/test/WebSites/WebApiCompatShimWebSite/Startup.cs
+++ b/test/WebSites/WebApiCompatShimWebSite/Startup.cs
@@ -23,15 +23,15 @@ namespace WebApiCompatShimWebSite
app.UseMvc(routes =>
{
- // This route can't access any of our webapi controllers
- routes.MapRoute("default", "{controller}/{action}/{id?}");
-
// Tests include different styles of WebAPI conventional routing and action selection - the prefix keeps
// them from matching too eagerly.
routes.MapWebApiRoute("named-action", "api/Blog/{controller}/{action}/{id?}");
routes.MapWebApiRoute("unnamed-action", "api/Admin/{controller}/{id?}");
routes.MapWebApiRoute("name-as-parameter", "api/Store/{controller}/{name?}");
routes.MapWebApiRoute("extra-parameter", "api/Support/{extra}/{controller}/{id?}");
+
+ // This route can't access any of our webapi controllers
+ routes.MapRoute("default", "{controller}/{action}/{id?}");
});
}
}