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 }
);
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…