내가 작업중인 프로젝트는 사용자를 인증하기 위해 고객 Active Directory와 통합됩니다. 사용자 암호를 검색 할 일부 코드를 작성하려고 시도했는데 Active Directory에서 포트 636의 SSL 연결을 통해서만 관련된 속성을 노출한다는 것을 알고 있습니다.C# : SSL을 사용하는 Active Directory에 연결하는 방법?
다음 코드는 SSL을 사용하지 않고 프로그래밍 방식으로 연결하지만 다음 작업을 수행 할 수 있습니다. 'T는 암호 속성을 참조하십시오
static void Main(string[] args)
{
DirectoryEntry entry = new DirectoryEntry(@"LDAP://<IP>/CN=LDAP Test,CN=Users,DC=customer,DC=com");
entry.AuthenticationType = AuthenticationTypes.None;
entry.Username = "CN=LDAP Test,CN=Users,DC=customer,DC=com";
entry.Password = "<password>";
if (entry != null)
{
foreach (Object propName in entry.Properties.PropertyNames)
{
Console.WriteLine((String)propName);
}
}
}
나는라는 예외가 SSL을 사용하는 코드를 변경하는 경우, 알 수없는 오류 (0x80005000)'.
Active Directory를 호스팅하는 서버에서 SSL을 사용하도록 설정하고 동일한 서버에 Microsoft CA를 설치하고 CA에서 인증서를 가져 왔습니다.
Apache Directory Studio를 사용하여 SSL을 통해 Active Directory에 연결할 수 있지만 암호 속성이 표시되지 않습니다.
static void Main(string[] args)
{
DirectoryEntry entry = new DirectoryEntry(@"LDAPS://<IP>:636/CN=LDAP Test,CN=Users,DC=customer,DC=com");
entry.AuthenticationType = AuthenticationTypes.SecureSocketsLayer;
entry.Username = "CN=LDAP Test,CN=Users,DC=customer,DC=com";
entry.Password = "<password>";
if (entry != null)
{
foreach (Object propName in entry.Properties.PropertyNames)
{
Console.WriteLine((String)propName);
}
}
}
나는 곳으로 갈 어떤 도움을 크게 감상 할 수있다 확실하지 않다 :
다음 코드
내가 SSL을 사용하여 연결하는 데 사용하는 것을 시도하고있다 보여줍니다.
관련 : http://stackoverflow.com/questions/287100/setting-up-ssl-in-active-directory-how-to/291826 –
아담 자주 묻는 질문은 여기에 있습니다 : HTTP ://www.microsoft.com/windowsserver2003/adam/ADAMfaq.mspx#EOD –
이 질문의 제목은 오해의 소지가 있습니다. "Active Directory에서 사용자 암호를 검색하려면 어떻게합니까?" SSL과 연결된 Active Directory에 연결할 수 있습니까? – Bratch