How do I set Default Controller for my ASP.NET MVC 4 project without making it HomeController?
How should I setup a default Area when the application starts?
How do I set Default Controller for my ASP.NET MVC 4 project without making it HomeController?
How should I setup a default Area when the application starts?
In case you have only one controller and you want to access every action on root you can skip controller name like this
I didnt see this question answered:
So, here is how you can set up a default Area:
Set below code in RouteConfig.cs in App_Start folder
IF still not working then do below steps
Second Way : You simple follow below steps,
1) Right click on your project solution
2) Select Property
3) Select Web option and then Select Specific Page (Controller/View) and then set your login page
Here, Account is my controller and Login is my action method (saved in Account Controller)
Please take a look attached screenshot.
the best way is to change your route. The default route (defined in your App_Start) sets
/Home/Index
as the default landing page. You can change that to be any route you wish.