Coder Perfect

There are several varieties that match the ‘Home’ controller.


I currently have two MVC3 projects available that are unconnected.

One works perfectly, but the other does not, resulting in the following error:

My hoster provides me with FTP access to a folder in which I have two other folders, one for each of my programs.

It works with since I publish my program to my local file system and then FTP the contents.

When I upload and try to run, the problem described above occurs, preventing me from using my site. All while continues to function normally.

Is looking for controllers EVERYWHERE in ftpFolderA2 and discovering another HomeController as a result? How can I instruct it to look exclusively in the Controller folder, as it should?


Can anyone confirm that this is the issue?

Asked by Only Bolivian Here

Solution #1

Another scenario in which you might get this problem is as follows. If you rename your project so that the assembly’s file name changes, you may end up with two copies of your ASP.NET assembly, both of which will reproduce the problem.

The solution is to delete the old dlls from your bin folder. (I tried “Rebuild Project,” but it didn’t work, so double-check the bin to make sure they’re gone.)

Answered by Kirk Woll

Solution #2

This error notice appears frequently when you use areas and the controller names inside the area and the root are the same. For instance, consider the following:

You might use namespaces when declaring your routes to solve this problem (like the error notice indicates). As a result, in Global.asax, in the primary route definition:

    new { controller = "Home", action = "Index", id = UrlParameter.Optional },
    new[] { "AppName.Controllers" }

/Areas/Admin/AdminAreaRegistration.cs and /Areas/Admin/AdminAreaRegistration.cs

    new { action = "Index", id = UrlParameter.Optional },
    new[] { "AppName.Areas.Admin.Controllers" }

If you don’t use areas, your two applications appear to be hosted within the same ASP.NET application, and conflicts arise since the identical controllers are defined in different namespaces. If you want to avoid conflicts, you’ll need to setup IIS to host those two as different ASP.NET applications. If you don’t have access to the server, ask your hosting provider for help.

Answered by Darin Dimitrov

Solution #3

It’s a little different in MVC4 and MVC5, therefore use the following.


namespace MyNamespace
    public class RouteConfig
        public static void RegisterRoutes(RouteCollection routes)

                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
                namespaces:  new[] {"MyNamespace.Controllers"}

and in Areas

                new { action = "Index", id = UrlParameter.Optional },
                new[] { "MyNamespace.Areas.Admin.Controllers" }

Answered by Developer

Solution #4

Watch this…

Then there’s this image (hope u like my drawings)

Answered by Tom

Solution #5

in your project folder/bin

Ensure that just your PROJECT PACKAGENAME.DLL is installed.


That may have appeared here by accident, or you may have simply renamed your project.

Answered by Sruit A.Suk

Post is based on