2

I have an MVC web app, and a nested admin application with areas with the same name:

/localhost/videos
/localhost/admin/videos

These are separate projects in the VS solution. The admin project is deployed into a folder off of the root app

Both Videos areas have a controller called VideosController. It appears that MVC is calling the root application's VideosController.Index instead of the admin site's VideosController.Index, but is (correctly) trying to return the admin/areas/videos/views/videos/index view.

I'd rather not have to go in and rename all of the admin controllers. Any suggestions?

1 Answer 1

1

What might help is specifying the default namespace.

typically something like this:

ControllerBuilder.Current.DefaultNamespaces.Add("MyProduct.Controllers");

So now, if MVC has two of something, it will have a default to fall back on. You will see a lot of the same issues if you start using Areas.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.