Geting Error Multiple types were found that match the controller named 'Home' Ask Question
If you have a controller with the same name (e.g., "HomeController") in different projects and you want to differentiate between them, a straightforward solution is to specify the project name when creating a route map. By doing so, when you run the application, it will clearly identify which project's controller you have selected.
For example, when setting up a route using MapRoute
in your route configuration, you can explicitly reference the controller by including the project name. This ensures that the correct controller is associated with the route during runtime. This practice helps avoid ambiguity and ensures that the application correctly identifies and utilizes the desired controller from the specified project.
Example:
namespaces: new string[] { "_360KMall.WebUI.Controllers" } // Newly Added namespaces parameter
Enter an email address to invite a colleague or co-author to join you on socimo. They will receive an email and, in some cases, up to two reminders.