我在 ASP.NET MVC4 中的应用程序我有:
<authentication mode="Forms">
<forms loginUrl="~/Logon/Autentica" timeout="120"></forms>
</authentication>
路线:
routes.MapRoute(
name: "Abcdef",
url: "{controller}/{action}/{conte}",
defaults: new { controller = "CampanhaResposta", action = "Resposta" }
);
网络配置:
<location path="CampanhaResposta/Resposta">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
它不起作用:www.website.com/mycode
但它正在起作用:www.website.com/CampanhaResposta/Resposta/mycode
为什么?