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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s