S
shiv
Hi all,
I am able to read groups in the domain but not able to
read the members within each group. can somebody help?
here goes the code
DirectoryEntry m_obDirEntry=new DirectoryEntry
("LDAP://mydomain");
SearchResultCollection results;
DirectorySearcher srch = new DirectorySearcher
(m_obDirEntry);
srch.Filter = "(objectClass=Group)";
results = srch.FindAll();
foreach (SearchResult src in results)
{
ActiveDs.IADsGroup grp=(ActiveDs.IADsGroup)
(src.GetDirectoryEntry().NativeObject);
Response.Write(grp.Name+"<br>");
// from here i want to read the names of the members in
this group
}
I am able to read groups in the domain but not able to
read the members within each group. can somebody help?
here goes the code
DirectoryEntry m_obDirEntry=new DirectoryEntry
("LDAP://mydomain");
SearchResultCollection results;
DirectorySearcher srch = new DirectorySearcher
(m_obDirEntry);
srch.Filter = "(objectClass=Group)";
results = srch.FindAll();
foreach (SearchResult src in results)
{
ActiveDs.IADsGroup grp=(ActiveDs.IADsGroup)
(src.GetDirectoryEntry().NativeObject);
Response.Write(grp.Name+"<br>");
// from here i want to read the names of the members in
this group
}