1

私のプロジェクトでは、最初のルート構成は以下のようでした

 public static void RegisterRoutes(RouteCollection routes)
  {
   routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
   routes.MapRoute(
   name: "Default",
  url: "{controller}/{action}/{id}",
 defaults: new { controller = "Home", action = "Login", id = UrlParameter.Optional }
            );
        }

今、私はに変更しました

 public static void RegisterRoutes(RouteCollection routes)
  {
   routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
   routes.MapRoute(
   name: "Default",
  url: "{controller}/{action}/{id}",
 defaults: new { controller = "Pro123", action = "Index", id = UrlParameter.Optional }
            );
        }

次に、ソリューションを再構築し、@ ローカル システムで再度実行します。それでもホームコントローラーのログインビューに行きます。何か不足していますか?

4

0 に答える 0