I currently have the following routines in my Global.asax.cs
file:
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default",
"{controller}/{action}/{id}",
new { controller = "Arrangement", action = "Index", id = "" }
);
}
protected void Application_Start()
{
RegisterRoutes(RouteTable.Routes);
// Debugs the routes with Phil Haacks routing debugger (link below)
RouteDebug.RouteDebugger.RewriteRoutesForTesting(RouteTable.Routes);
}
When I hit F5
, the application fires up and unless I have a view named Index.aspx
in the ~/Views/Home/
folder, I get the "View missing" error message, although I have re-defined the default route and removed the HomeController
. I would expect to get the routing debugger, and if not that at least a request for ~/Views/Arrangement/Index.aspx
.
A breakpoint on RegisterRoutes(Routetable.Routes);
is never hit when debugging.
I have tried building, rebuilding, restarting VS, cleaning, rebuilding again etc, but nothing seems to work. Why doesn't the application run the current version of the code?