Geting Error Multiple types were found that match the controller named 'Home' Ask Question
By   Musawar Hussain     04-May-2024    2

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

Solutions


10393
Copyright Future Minutes © 2015- 2024 All Rights Reserved.   Terms of Service  |   Privacy Policy |  Contact US|  Pages|  Whats new?
Update on: Dec 20 2023 05:10 PM
03
07

New Messages

George Floyd
  • Edit Post Edit This Post within a Hour
  • Hide Chat Hide This Post
  • Delete Chat If inappropriate Post By Mistake
  • Report Inappropriate Chat
  • 4.5kb
  • Hi James! Please remember to buy the food for tomorrow! I’m gonna be handling the gifts and Jake’s gonna get the drinks
  • Hi James! Please remember to buy the food for tomorrow! I’m gonna be handling the gifts and Jake’s gonna get the drinks
  • Hi James! Please remember to buy the food for tomorrow! I’m gonna be handling the gifts and Jake’s gonna get the drinks