그룹 이름이 CN = RA010-CAT-PAT-PUN입니다. LDAP를 사용하거나 System.DirectoryServices.Protocols를 사용하여이 그룹의 고유 이름을 어떻게 얻을 수 있습니까? 나는 LdapConnection이 는 SearchRequest에를 사용하여LDAP를 사용하여 이름/CN 만 알고있는 경우 Group DistinguishedName을 얻는 방법은 무엇입니까?
public LdapConnection GetLdapConnection()
{
_ldapDirectoryIdentifier = new LdapDirectoryIdentifier(_currentDomain, _defaultPort);
return new LdapConnection(_ldapDirectoryIdentifier);
}
public void GetLdapConnectionForusers()
{
try
{
_ldapConnectionUsers = GetLdapConnection();
_ldapConnectionUsers.AuthType = AuthType.Basic;
_ldapConnectionUsers.SessionOptions.SecureSocketLayer = false;
if (_communicationSecurity == 1)
_ldapConnectionUsers.SessionOptions.VerifyServerCertificate = verifyCertificateCallBack;
NetworkCredential network = new NetworkCredential(_userName, _password);
_ldapConnectionUsers.Bind(network);
IsLdapConnectionEstabilished = true;
}
catch (Exception ex)
{
IsLdapConnectionEstabilished = false;
throw;
}
}
는 어떻게 그룹 "RA010-CAT-PAT-PUN"에 대한 distinguishedName을받을 수 있나요?
미리 감사드립니다.
이 질문에 대한 답변을 다시 작성하십시오. – EJP