ASP.NET MVC 5中Windows身份验证中的用户域 [英] User domain in windows authentification in ASP.NET MVC 5

查看:82
本文介绍了ASP.NET MVC 5中Windows身份验证中的用户域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我想授权MyDOMAIN中的用户(MyDOMAIN \ MyYERER)访问我的Web ASP.NET MVC应用程序,而不属于此DOMAIN的其他用户无法进行身份验证。怎么办?



我尝试过:



我想要做的是使用[Authorize(Users =MyDOMAIN \\ *)]创建一个HomeController.cs控制器,但我不知道要替换*以便占用所有用户?

Hello, I want to authorize access to my Web ASP.NET MVC application only by users in MyDOMAIN (MyDOMAIN\MyUSER), and other users who don't belong to this DOMAIN can not authenticate. How to proceed ?

What I have tried:

What I wanted to do is create a HomeController.cs controller with [Authorize (Users = "MyDOMAIN\\ * ")], but I do not know what to replace * in order to take all users ?

推荐答案

您需要为您的要求实施Windows身份验证。



Windows身份验证< windowsAuthentication> :官方Microsoft IIS站点 [ ^ ]



使用IIS Express的MVC4中的Windows身份验证 [ ^ ]
You need to implement Windows authentication for your requirement.

Windows Authentication <windowsAuthentication> : The Official Microsoft IIS Site[^]

Windows Authentication in MVC4 With IIS Express[^]


这篇关于ASP.NET MVC 5中Windows身份验证中的用户域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆