Reputation: 1712
I tried to change my default route template:
But when I start my project (without any url path - just: http://localhost:49406/) it always loads the Index instead of the About. I have no other routes and I don't use attribute routing at all.
I also tried to change the default controller:
It loads the HomeController's Index instead of the MainController's Index.
Is it a bug or I forgot something?
Upvotes: 2
Views: 1596
Reputation: 1545
If you are not using any attribute routing at all the problem should come from your Startup.cs
file.
Make sure that you are calling app.UseMvc()
only and not app.UseMvcWithDefaultRoute()
in Configure
method.
Upvotes: 1