Here's my scenario. I have two controllers with the same name, in different MVC projects. Each controller can contain the same actions (same name), but can also contain different actions (not specified in the other controller). I've registered two routes, each with their own namespace.
When I browse to the page "Controller/Action1", this is OK. When I browse to "Controller/ActionInSecondController" (the action is not in the first controller) it throws a 404.
Is it possible, and how, to be able to call the second controller's action method?
(Note: I added a referenced the second project and its dll is compiled into the same bin folder location).
my route definitions:
routes.MapRoute(
name: "Default1",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
namespaces: new string[]{ "Site1.Controllers" }
);
routes.MapRoute(
name: "Default2",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
namespaces: new string[]{ "Site2.Controllers" }
);