Search code examples
asp.netaspnetboilerplate

How to set another page as default page in ASPNET BOILERPLATE MVC5?


I'm trying change default page when I start my app, but I can't do it. When I start the first page is "Account/Login", but I need it changes to other pages.

In project web I'm doing this: * HomeController: Add HomePage actionResult * View/Home: Add View to Home with name HomePage

In app_start/routeconfig.cs

routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "HomePage", id = UrlParameter.Optional } );

Also, i changed the properties of web project to specify page: Home/Homepage, but it's not working

Results in both options arent work

Template: Boilerplate with ASP.NET MVC 5 + Zero Module

i'm new with abp.


Solution

  • Maybe it's better to use a different controller for anonymous actions. Create a new controller called WelcomeController. Do not add a AbpMvcAuthroize attribute. Then set your default route as Welcome/Index.