How do you set the startup page for debugging in an ASP.NET MVC application?

后端 未结 6 1925
伪装坚强ぢ
伪装坚强ぢ 2020-11-29 21:47

How do you start debugging the application at the application root? For example: http://localhost:49742/

I\'m always getting a page which doesn\'t e

6条回答
  •  长情又很酷
    2020-11-29 22:22

    Selecting a specific page from Project properties does not solve my problem.

    In MVC 4 open App_Start/RouteConfig.cs

    For example, if you want to change startup page to Login:

    routes.MapRoute(
            "Default", // Route name
            "",        // URL with parameters
            new { controller = "Account", action = "Login"}  // Parameter defaults
        );
    

提交回复
热议问题