[英]ASP.NET MVC - Authenticate users against Active Directory automatically?
I'm developing a MVC application that will require a user to be authenticated against an AD. 我正在开发一个MVC应用程序,该应用程序需要根据AD对用户进行身份验证。 how to create log in page in MVC to create an Intranet Application that automatically authenticates a user against an AD
如何在MVC中创建登录页面以创建可根据AD自动验证用户身份的Intranet应用程序
Why don't you use the Intranet Template provided by Microsoft Visual Studio, which does exactly what you want out of the box? 您为什么不使用Microsoft Visual Studio提供的Intranet模板,它完全可以满足您的需求?
Your requirement is paradox. 您的要求是矛盾的。 Why do you want a login page, which does login a user automatically, while being logged in by visiting the (main-)site automatically, does not require the visitor to do anything at all, because he is already authenticated by entering his credentials at the windows-logon
为什么要登录页面自动登录用户,同时通过自动访问(main-)网站登录,所以根本不需要访问者做任何事情,因为访问者已经通过输入以下凭据进行了身份验证: Windows登录
More information: http://msdn.microsoft.com/en-us/library/gg703322(v=vs.98).aspx 详细信息: http : //msdn.microsoft.com/zh-cn/library/gg703322(v=vs.98).aspx
you can use the built in windows authentication feature. 您可以使用内置的Windows身份验证功能。 the example is in here
例子在这里
if you need mixed authenticated for example you want the user can access from outside using their AD it will involve either two applications or two different pages for authentication types. 例如,如果您需要混合身份验证,则希望用户可以使用他们的AD从外部访问它,它将涉及两个应用程序或两个不同的身份验证类型页面。 find the example here
在这里找到例子
I'm not entirely sure if you actually want a login page that automatically authenticates a user that visits the main site. 我不确定您是否真的想要一个登录页面来自动验证访问主站点的用户。 Maybe your wording is a bit confusing there.
也许您的措辞有点令人困惑。
I'll asumme you want your Web-App to be able to authenticate users against AD after having to log in with intranet credentials. 我会假设您希望您的Web应用程序能够在必须使用Intranet凭据登录后才能根据AD对用户进行身份验证。 If that's the case, you might want to have a look at this article detailing how to set that up using IIS and an ASP.NET app.
在这种情况下,您可能需要看一下这篇文章,详细介绍如何使用IIS和ASP.NET应用程序进行设置。
If not, please disregard this answer. 如果不是,请忽略此答案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.