LDAP / DirectoryEntry.Bind problems

G

Guest

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
above.

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...
 
G

Guest

MORE INFO:

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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top