System.DirectoryEntry Unknown error (0×80005000)
I have recently encountered this really unhelpful error message in VB.Net whilst trying to code a connection to an LDAP server.
After much head banging I found the solution! It’s all down to the path you supply to the constructor:
Old Connection (doesn’t work):
Using dir As New DirectoryEntry(ldap://yourserver:port) ' Your Code End Using
New Connection (does work):
Using dir As New DirectoryEntry(LDAP://yourserver:port) ' Your Code End Using
Spot the difference? That’s right! the protocol part (LDAP) is case sensitive. Changing to uppercase works like a charm.
Update: I have posted an article and sample code on working with LDAP here.
Technorati Tags: vb.net, directoryentry, unknown error, ldap
April 18th, 2008 at 3:12 pm
Hello Barry
This helped me as lot. Thank you! I storm-clicked some banners for reward.
Best regards.
December 18th, 2009 at 8:48 pm
Wow,
That is annoying. Thanks for helping us noobs out.
December 23rd, 2009 at 4:57 pm
Hi.
Thanks for the post, you’re Google’s top hit for “unknown error 80005000″! Quite an achievement…
Just hit this error and spent a while trying to figure out the cause, you saved me a lot of head-keyboard induced pain.
Followed Ben’s example and did a stack of banner-clicking for you.