3

I have one solution with two project MVC. I added a references to second project to main project. I create a new MapRoute in first project to second project.

routes.MapRoute(
           name: "second",
           url: "second",
           defaults: new { controller = "Home", action = "Index" },
           namespaces: new[] { @"SecondProject.Controllers" });

this code has been added in RouteConfig in main project

when I write in URL address https://localhost/second... not working...any idea why?

Ciprian Jijie
  • 479
  • 5
  • 20

1 Answers1

0

First up all please check the namespace path is right at your end. then add below line in route config after route declaration.

myRoute.DataTokens["UseNamespaceFallback"] = false; 

you can refer stackoverflow link as well which may be helpful Controller in separate assembly and routing

Sunita
  • 44
  • 1
  • 5