Error: The controller for path ‘/’ was not found or does not implement IController.


Error: The controller for path ‘/’ was not found or does not implement IController.

Description: Common MVC Controller error every one faces during setting up of default Controller in Route configuration file. The reasons can be different and very difficult to find out the root cause because the Exception object wont pin point to the exact location or root cause of error. It can be due to Areas with shared layout, not using same controller name etc. etc.

Solution: Open RouteConfig.cs from App_Start check the controller name value. If you are appending “Controller” key word then just remove it. This is one of the reason, will add more in future.

Example:

Before,

 controller = "Default1Controller" 

remove “Controller” keyword, use just

 controller = "Default1" 

Also, make sure you are providing proper action view.

Advertisements