BotLab MVC路由不起作用
|
我刚刚从Rock,Paper,Azure网站下载了BotLab代码,并且正在玩弄它,但无法获得其中一种工作路线。他们来了:
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute(\"{resource}.axd/{*pathInfo}\");
routes.IgnoreRoute(\"favicon.ico\");
routes.MapRoute(
\"GameLog\",
\"GameLog/{teamName}.vs.{otherTeamName}\",
new { controller = \"GameLog\", action = \"Index\" }
);
routes.MapRoute(
\"Default\",
\"{controller}/{action}/{id}\",
new { controller = \"Home\", action = \"Index\", id = \"\" }
);
routes.MapRoute(
\"None\",
\"\",
new { controller = \"Home\", action = \"Index\", id = \"\" }
);
}
如果我尝试导航到~/GameLog/Something.vs.SomethingElse
URL,则会得到404。如果我转到~/GameLog/
URL,它将命中默认路由。我不太明白为什么第一条路线不匹配~/GameLog/Something.vs.SomethingElse
。
因此,仅为了遵守危险规则,为什么第一条路线无法按预期运行?
没有找到相关结果
已邀请:
1 个回复
素汞读