COMException (0x80004005): Unspecified error] in DirectorySearcher.FindAll() means LDAP string is invalid.

I've got an error COMException (0x80004005) when called DirectorySearcher.FindAll() and had no idea, why it happened.

Thanks to DirectorySearcher.FindAll() causes Unspecified Error in C# but not in VB.NET discussion I was pointed, that

the error is shown if DirectorySearcher.SearchRoot  path is not valid, e.g. it is “DomainName” instead of “LDAP://DomainName“.

I beleive MS could provide more clear error description.

 

posted @ Monday, December 19, 2005 10:58 AM

Print

Comments on this entry:

# re: COMException (0x80004005): Unspecified error] in DirectorySearcher.FindAll() means LDAP string is invalid.

Left by Dave Markle at 4/17/2006 4:37 AM
Gravatar
Thanks, man, you just saved me a BOATload of time!

# re: COMException (0x80004005): Unspecified error] in DirectorySearcher.FindAll() means LDAP string is invalid.

Left by glgdf at 3/9/2007 2:08 AM
Gravatar
(it's just crappy code again)

i got the same erro when using

ldap://

instead of

LDAP://

geez!!

# re: COMException (0x80004005): Unspecified error] in DirectorySearcher.FindAll() means LDAP string is invalid.

Left by glgdf at 3/9/2007 2:10 AM
Gravatar
I wonder from what planet ms digged up these coders & testers


# re: COMException (0x80004005): Unspecified error] in DirectorySearcher.FindAll() means LDAP string is invalid.

Left by Brendan at 6/22/2008 7:58 PM
Gravatar
Another thanks from me!
I had same issue: Not putting "LDAP://server/" at the front of my path.

I agree the errors suck. Every time .net needs to drop out to a com component things get nasty and it feels like 1990s microsoft all over again.

Your comment:



 (will not be displayed)


 
 
 
Please add 6 and 7 and type the answer here:
 

Live Comment Preview:

 
«September»
SunMonTueWedThuFriSat
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011