DirectorySearcher: Problem with receiving Account Name (the slash maybe the reason)

  • Thread starter Thread starter eloymaster
  • Start date Start date
E

eloymaster

Hi!

I do have a problem while retrieving the AccountName of Members of a Active Directory-Group.

I get the members with the DirectorySearcher (of the System.DirectoryServices namespace).
It all works well with member-entries like:
"CN=blablabla,OU=Users,OU=xxx,OU=xx,DC=xx,DC=xxxxxx,DC=com"
or
"CN=lastname\,firstname info&X moreinfo-A,OU=Users,OU=xxx,OU=xx,DC=xx,DC=xxxxxxx,DC=com"

but not with:

"CN=lastname\,firstname xxx/xxx moreinfo-B,OU=Users,OU=bib,OU=xx,DC=xx,DC=xxxxxxx,DC=com"

I suppose the slash between "xxx/xxx" produces the error.

I this a bug, any ideas? I can not change the AD-entries for the users....

thanks in advance

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
I got this solution from another newsgroup:

I have to mask the '/' with an '\'.
This seems to be a bug in the directory searcher class, beacuse it masks the
',' automatically, but not the '/'.


Robin Bully said:
Hi!

I do have a problem while retrieving the AccountName of Members of a Active Directory-Group.

I get the members with the DirectorySearcher (of the
System.DirectoryServices namespace).
It all works well with member-entries like:
"CN=blablabla,OU=Users,OU=xxx,OU=xx,DC=xx,DC=xxxxxx,DC=com"
or
"CN=lastname\,firstname info&X moreinfo-A,OU=Users,OU=xxx,OU=xx,DC=xx,DC=xxxxxxx,DC=com"

but not with:

"CN=lastname\,firstname xxx/xxx moreinfo-B,OU=Users,OU=bib,OU=xx,DC=xx,DC=xxxxxxx,DC=com"

I suppose the slash between "xxx/xxx" produces the error.

I this a bug, any ideas? I can not change the AD-entries for the users....

thanks in advance

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP &
ASP.NET resources...
 
Back
Top