创建用于 LDAP 访问的用户名 Active Directory
我是 LDAP 和 Active Directory 的新手。
我需要为有资格访问特定计算机的用户建立一个活动目录。当用户在 Web 界面(用 C# 创建)中输入用户名和密码时,系统会通过 LDAP 查询活动目录将其发送到活动目录。如果登录成功,AD将返回用户的电子邮件地址。
是否可以在本地设置 Active Directory 来实现上述场景?我使用的是 Windows 7 旗舰版。我已安装 ADAM 以进行 LDAP 访问。
问候,
约翰。
I am a newbie to LDAP and Active Directories.
I need to build a active directory of users who are eligible to access a particular conputer. When the user enters the username and password in a web interface(created in C#) it is sent to the active directory via LDAP query to the active directory. AD will return users email address if the login is successful.
Is it possible to setup a Active Directory to achieve the above scenario locally? I am using Windows 7 Ultimate. I have installed ADAM for LDAP access.
Regards,
John.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于您使用的是 .NET 3.5 及更高版本,因此您应该检查
System.DirectoryServices.AccountManagement
(S.DS.AM) 命名空间。在这里阅读所有相关内容:管理 .NET Framework 3.5 中的目录安全主体
基本上,您可以定义域上下文并轻松地在 AD 中查找用户和/或组:
新的 S.DS.AM 使在 AD 中使用用户和组变得非常容易!
对于 ADAM(或今天所说的 AD LDS),您可以使用
ADAM 目录建立上下文 - 不确定,但您可能必须提供某种形式的附加信息才能知道要使用哪个应用程序目录(我从来没有在 ADAM 上玩过这个)。另外:我不确定您是否可以根据 ADAM 存储验证凭据......您只需要看看并尝试即可!
Since you're on .NET 3.5 and up, you should check out the
System.DirectoryServices.AccountManagement
(S.DS.AM) namespace. Read all about it here:Managing Directory Security Principals in the .NET Framework 3.5
Basically, you can define a domain context and easily find users and/or groups in AD:
The new S.DS.AM makes it really easy to play around with users and groups in AD!
For ADAM (or AD LDS as it's called today), you could use
to establish a context with your ADAM directory - not sure, but you probably have to supply some form of additional information to know what Application directory to use (I've never played with this on ADAM). And also: I'm not sure if you can validate credentials against an ADAM store .... you'll just have to see and try!