MVC Windows身份验证允许域中的所有用户 [英] mvc windows authentication allow all users from domain
问题描述
我有一个使用Windows身份验证的MVC Intranet应用程序.目前,它具有一个具有三个动作的控制器.
I have an mvc intranet application using windows authentication. It currently has one controller with three actions.
第一个操作(索引)应该对所有人都可用,这没问题.第二个操作和第三个操作应仅对特定DOMAIN中的用户可用.但是<Authorize()>
标记仅给我两个选项:角色"或用户".我尝试使用用户"并将其设置为"DOMAIN *"和"DOMAIN \?"但这是行不通的.
The first action (index) should be available to everyone, this is no problem. The second and the third actions should only be available to users in a specific DOMAIN. However the <Authorize()>
tag only gives me 2 options: Roles or Users. I tried using Users and setting it to 'DOMAIN*' and 'DOMAIN\?' but that doesn't work.
我一直在Internet上进行搜索,但似乎找不到任何方法来实现自己想要的目标.我希望这里有人可以帮助我!
I've been searching all over the internet but can not seem to find any way of accomplishing what I want. I hope someone here can help me out!
推荐答案
使用DOMAIN\Domain Users
作为角色名称.它是一个内置组,其中包含您所猜测的域中的所有用户.
Use DOMAIN\Domain Users
as the role name. Its a built-in group that contains, you guessed it, all users in the domain.
这篇关于MVC Windows身份验证允许域中的所有用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!