I have an empty ASP.NET application and I added an index.html file. I want to set the index.html as default page for the site.
I have tried to right click on the index.html and set as start page, and when I run it the url is: http://localhost:5134/index.html
but what I really want is that when I type: http://localhost:5134
, it should load the index.html page.
my route config:
public class RouteConfig
{
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 }
);
}
}
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
todefaults: new { controller = "Main", action = "Index", id = UrlParameter.Optional }
– Prowlaction = "Index"
if the really action name is 'index' – Prowl