【发布时间】:2012-11-29 21:28:32
【问题描述】:
我有一个 Windows 身份验证 Intranet 站点。
<authentication mode="Windows" >
</authentication>
<authorization>
<deny users="?" />
</authorization>
如果用户在Controller上授权失败,
[Authorize(Roles="Admin")]
public class SearchController : BaseController
我希望他们定向到 ~/UnAuthorized/Index
这可以在 Web.Config 中设置,类似于我可以重定向到登录页面的表单身份验证吗?我只想重定向到我在 (~/UnAuthorized/Index) 处的简单 [AllowAnonymous] 控制器
【问题讨论】:
标签: asp.net-mvc asp.net-mvc-4 windows-authentication