Asp.net mvc 4 MVC应用程序使用的位置路径不';行不通

Asp.net mvc 4 MVC应用程序使用的位置路径不';行不通,asp.net-mvc-4,web-config,authorization,Asp.net Mvc 4,Web Config,Authorization,我想使用位置路径,允许用户和拒绝用户在我的MVC应用程序中限制访问。这是我添加到web.config的部分 <location path="Views/Admin/Ticketing/Seasons.aspx"> <system.web> <authorization> <allow users="admin" /> <deny users="user1" /> </authorization> &

我想使用位置路径,允许用户和拒绝用户在我的MVC应用程序中限制访问。这是我添加到web.config的部分

 <location path="Views/Admin/Ticketing/Seasons.aspx">
<system.web>
  <authorization>
    <allow users="admin" />
    <deny users="user1" />
  </authorization>
</system.web>
</location>

有人能告诉我我做错了什么吗

尝试此位置路径:

<location path="Admin/TicketingSeasons">
<system.web>
  <authorization>
    <allow users="admin" />
    <deny users="user1" />
  </authorization>
</system.web>
</location>

path属性与URL匹配,而不是与文件路径匹配
public ActionResult TicketingSeasons()
    {
        return View("Ticketing/Seasons");
    }
<location path="Admin/TicketingSeasons">
<system.web>
  <authorization>
    <allow users="admin" />
    <deny users="user1" />
  </authorization>
</system.web>
</location>