通过Active Directory(LDAP)与ASP.Identity验证用户 [英] Authenticate user through active directory (LDAP) with ASP.Identity

查看:588
本文介绍了通过Active Directory(LDAP)与ASP.Identity验证用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何做到这一点,但至今没有运气环顾四周。任何人都知道从哪里开始?基本上我公司有活动目录服务器和我建立一个网站,用户将使用其公司的帐户登录。

I've looked around on how to do this but no luck so far. Anyone know where to start? Basically my company have active directory server and I build a site where user will use their company account to login.

我已经试过从Visual Studio Web应用程序的组织帐户选项,但它返回无效的域名。以下

I've tried Organizational Accounts option from Visual Studio Web Application but it returned Invalid domain name. Pic below

任何帮助将AP preciated。

Any help will be appreciated.

推荐答案

据我了解你的问题,你是通过Active Directory,这将是个人帐户在上面的列表中查找窗体身份验证。

From what I understand of your question, you're looking for forms authentication via Active Directory, which would be 'Individual Accounts' in the list above.

微软已经就如何实现这一目标的指导。中的引导对于ASP.NET Web窗体,但应该很容易转移到MVC,只是尽量不要过于复杂事情。

Microsoft has a guide on how to achieve this. The guide is for ASP.NET Web Forms but should be easily transferable to MVC, just try not to overcomplicate anything.

谷歌在这附近搜索应该做的谨慎,因为它很容易Forms身份验证对AD与对广告的Windows身份验证混淆,如果你想使用一个登录表单,你一定要形式。您可能还需要确保

Google searching around this area should be done with caution as it is easy to confuse Forms authentication against AD with Windows authentication against AD, and if you want to use a login form, you definitely want forms. You will likely also want to make sure that

为导向的细分;

  1. 第1步

    创建一个表单验证型网站。

  1. Step 1

    Create a forms authentication based website.

覆盖Machine.config中的表单与你的web.config

Override Machine.config for Forms with your Web.config

配置ActiveDirectoryMembershipProvider和相关的连接字符串来连接AD服务器。

Configure the ActiveDirectoryMembershipProvider and relevant connection strings to connect to your AD server.

电线这一切和应用验证的形式。

Wire it all up and apply validation to the form.

<一个href="http://stackoverflow.com/questions/2610377/how-can-i-provide-an-asp-net-forms-authentication-ux-while-using-active-directory/2634718#2634718">relevant链接1

<一个href="http://stackoverflow.com/questions/4342271/asp-net-mvc-forms-authorization-with-active-directory-groups">relevant链接2

这篇关于通过Active Directory(LDAP)与ASP.Identity验证用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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