Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net mvc 设置索引主页而不是Azures此移动应用已启动并正在运行_Asp.net Mvc_Azure - Fatal编程技术网

Asp.net mvc 设置索引主页而不是Azures此移动应用已启动并正在运行

Asp.net mvc 设置索引主页而不是Azures此移动应用已启动并正在运行,asp.net-mvc,azure,Asp.net Mvc,Azure,我在Route.Config中的所有重定向都正常工作,而不是我的主页默认链接显示Azure的此移动应用已启动并正在运行 下面是我的RouteConfig代码 routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.IgnoreRoute(""); routes.MapRoute( name: "/Index", url: "Index/{id}", defa

我在Route.Config中的所有重定向都正常工作,而不是我的主页默认链接显示Azure的此移动应用已启动并正在运行

下面是我的RouteConfig代码

 routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.IgnoreRoute("");



            routes.MapRoute(
    name: "/Index",
    url: "Index/{id}",
    defaults: new { controller = "MyController", action = "Index", id = UrlParameter.Optional }
);
当我添加不带/index的代码时,我在>和>上得到404

有人知道在哪里可以更改此配置/设置吗


问候

在Startup.MobileApp.cs中调用了.UseDefaultConfiguration()方法。这部分是AddMobileAppHomeController(),它依赖于相应的Microsoft.Azure.Mobile.Server.Controller.HomeController引用。我相信这是阻碍你实施你正在做的事情的原因


非常感谢,我必须删除新的MobileAppTableConfiguration()方法。工作起来就像一个魔咒。
  routes.MapRoute(
        name: "without /index",
        url: "{controller}/{action}/{id}",
       defaults: new { controller = "MyController", action = "Index", id = UrlParameter.Optional }
    );