I have existing asp.net web forms applications that I have added RouteConfig.RegisterRoutes(RouteTable.Routes);
to their global.asax files. I'm attempting to use some MVC alongside the forms - like friendly urls. The code is pretty standard and includes this:
public static void RegisterRoutes(RouteCollection routes)
{
var settings = new FriendlyUrlSettings { AutoRedirectMode = RedirectMode.Permanent };
routes.EnableFriendlyUrls(settings, new MyFriendlyUrlResolver());
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { action = "Index", id = UrlParameter.Optional }
);
}
It's all pretty much boilerplate code, aside from the custom friendly url resolver, so I'm not understanding why I am getting a lot of "The controller path for '/null' was not found or does not implement IController" errors now.
Am I getting a bunch of traffic to www.mysite.com/null now or does this have something to do with routing? Is there a special way to set up routing for a forms-heavy site? I have created new apps with forms + MVC and this is pretty much the code that the project comes with.