The code below returns the following error :
"There is no such object on the server."
string LDAPAddress = "LDAP://mydomain/CN=grouptosearchfor
members,dc=mydomain,DC=co,DC=uk";
DirectoryEntry mygroup = new DirectoryEntry(LDAPAddress);
string groupMembers = "";
foreach (object dn in mygroup.Properties["member"]) <---------here
{
// get names here...
}
Any suggestions/ideas would be great.
TIA
Ian
--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
"Iain" <ia...@test.co.uk> wrote in message
news:e827vpFZ...@TK2MSFTNGP02.phx.gbl...
I don't think that string would ever work; you'd need to include the OU
or CN of the container where the group resides.
> DirectoryEntry mygroup = new DirectoryEntry(LDAPAddress);
> string groupMembers = "";
> foreach (object dn in mygroup.Properties["member"]) <---------here
> {
> // get names here...
> }
>
> Any suggestions/ideas would be great.
>
> TIA
> Ian
--
Gerry Hickman (London UK)