The standard FooController naming convention dictates that all controllers must have the suffix "Controller"; this way, when your current route points to the controller "Foo", ASP.NET MVC checks the types inside your application that inherit from Controller and look for a name whose name matches "Foo" + "Controller".
You are right in believing that ASP.NET MVC uses reflection to find the right controller, but this is a relatively small impact, since reflection data is cached by the application during its initial launch.
If you have two controllers with the same name and different namespaces, you can use the alternative MapRoute () form to indicate which controller you are going to allow.
routes.MapRoute( "Error_ServiceUnavailable", "error/service-unavailable", new { controller = "Error", action = "ServiceUnavailable" }, new[] { "Controllers" } ); routes.MapRoute( "Admin_Error_ServiceUnavailable", "admin/error/service-unavailable", new { controller = "Error", action = "ServiceUnavailable" }, new[] { "Areas.Admin.Controllers" } );
source share