窗体身份验证对Active Directory

编程入门 行业动态 更新时间:2024-10-27 10:24:15
本文介绍了窗体身份验证对Active Directory - LDAP协议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我需要创建一个网页,对现有的Active Directory用户进行身份验证。域名实际上是一个云计算配置,其中有堆栈上的域控制器和多个其他服务器。

I need to create a web page that authenticates users against an existing active directory. The domain is actually a cloud computing configuration where there is a domain controller and multiple other servers on the stack.

据我所知,可用于从System.DirectoryServices命名空间的对象。不过,我似乎无法路径code到Active Directory通过LDAP://domain 地址。目前似乎没有任何的沟通正在进行。我怀疑有一些初始配置必要或安全措施阻止通信。

I understand that objects from the System.DirectoryServices namespace can be used. However, I cant seem to path the code to the active directory through the LDAP://domain address. There doesnt seem to be any communication going on. I suspect there is some initial configuration necessary or security measures blocking the communication.

我用这个例子从MSDN工作: msdn.microsoft/en-us/library/ms180890(v=vs.80).aspx 。

I am working with this example from MSDN: msdn.microsoft/en-us/library/ms180890(v=vs.80).aspx.

我得到一个错误,指出该服务器不可操作。

I get an error that says the server is not operational.

推荐答案

看看这个链接(取代旧有web.archive):

Take a look at this link (replaced old one with web.archive):

HTTP://www.$c$cproject/KB/system/everythingInAD.aspx#35

这是如何得到默认项:

try { System.DirectoryServices.DirectoryEntry AdRootDSE = new System.DirectoryServices.DirectoryEntry("LDAP://rootDSE"); string rootdse = System.Convert.ToString(AdRootDSE.Properties["defaultNamingContext"].Value); if (!rootdse.StartsWith("LDAP://", StringComparison.OrdinalIgnoreCase) && !rootdse.StartsWith("LDAPS://", StringComparison.OrdinalIgnoreCase)) { rootdse = "LDAP://" + rootdse; } return rootdse; } catch (Exception ex) { }

更多推荐

窗体身份验证对Active Directory

本文发布于:2023-11-14 08:56:38,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1586777.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:窗体   身份验证   Directory   Active

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!