470,636 Members | 1,381 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,636 developers. It's quick & easy.

LDAP / DirectoryEntry.Bind problems

I'm wondering if anyone has come across this problem before - it's got me
stumped (but then again, I don't know a great deal about AD!!)

In a specific set of circumstances, we get a really useful 'Unknown Error'
generated from the DirectoryEntry.Bind method using c# .net (framework v1.1).
I've tried a few things to see if it makes any difference (I'm making
extra-sure the entry, searcher and result collection objects are disposed off
when we're finished with them), and I'm not using the searcher.FindOne method
either (have read that this doesn't always dispose of itself properly in v1.1
of the framework).

The scenario is as follows - we have an enterprise application, with a
web-based front end for the users and a windows-based back end for the
admins. Retrieving active directory details from either of these works as
expected. However, we re-use the web-based front end as a viewer in the
windows-based back end. So, we can merrily work away in the back-end
retrieving user details from active directory, but once we've used the
web-based viewer we get the error outlined above. The web-based viewer also
retrieves details from active directory successfully, but when you go back to
the windows app and try to get active directory details you get the error

Could this be caused by the setup of the servers / domains? Basically, the
windows-based app is being accessed by people who have access to the domain,
and we're using their credentials to query via LDAP. From the web-based app,
we use a specific user name and password to get at the same information. The
difference with the web app is that the web server is sitting on a different
domain from the one that we want to query, but it is trusted by the domain we
want to query so doesn't appear to cause any problems.

Also, the server we're talking to has Win Server 2003 with SP1.

Any ideas what might be causing this? I've been tearing my hair out with
this one...

Mar 13 '06 #1
1 2531

Have investigated this a bit more, and the problem only seems to be after
the first call to the directory entry.bind after we've switched credentials -
after that, it works OK again. In the meantime I've put in a bit of a
workaround that'll do a dummy connect and catch the exception where
necessary, but still not sure what's causing the problem...
Mar 16 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Amar | last post: by
2 posts views Thread by CodeRazor | last post: by
1 post views Thread by Andrew | last post: by
3 posts views Thread by Marshall | last post: by
4 posts views Thread by Nico Koenig | last post: by
2 posts views Thread by Neil via .NET 247 | last post: by
3 posts views Thread by mbasil77 | last post: by
3 posts views Thread by RJN | last post: by
1 post views Thread by Korara | last post: by
reply views Thread by Stoney L | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.