I want to go to http://myserver
and be able to get Help Pages as the default home page, so the first thing a guest to http://myserver
should see is the Help Page.
I have a default route set up like this:
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
Then I have my Help Page Area registration set up like this:
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute(
"HelpPage_Default",
"doc/{action}/{apiId}",
new { controller = "Help", action = "Index", apiId = UrlParameter.Optional });
HelpPageConfig.Register(GlobalConfiguration.Configuration);
}
When I change RouteConfig's controller
to "Help"
I get:
The view 'Index' or its master was not found or no view engine supports the searched locations
When I change Help Page route to "{controller}/{action}/{apiId}"
my AttributeRoutes stop working.
Is there some easy way to make ASP.NET Help Pages default home page?