>I'm trying to read some data with C# in .NET 2.0. I'm using the Directory
>classes as follows:
> DirectoryEntry entry = new DirectoryEntry();
> entry.Path =
[quoted text clipped - 11 lines]
>"0x8007203A: The server is not operational".
>(Translated English version, we use VS2005 German)
I would suspect that the LDAP path is invalid / incomplete. In most
cases, it should AT LEAST also contain some dc= elements, something
like
LDAP://myServer.intern.mycompany.de/ou=MyApplication,ou=SRV,dc=MyCompany,dc=de
Also, I am uncertain if the port 51000 that you seem to specify here
is valid and will work.
Another suspicion I have is that you're trying to use the
DirectorySearcher against an LDAP store which is not really Active
Directory - that won't work, in most cases, I'm afraid. It seems that
while DirectoryEntry per se is fairly "portable" across LDAP
implementations, DirectoySearcher often is not.
Marc
Harald - 22 Sep 2006 12:23 GMT
Hi Marc,
as I stated - the path works and the port number is also not the matter of
concern because it all also works in jXplorer. But you are right that the
connected server is a sun machine and not a microsoft server. Is it true
that DirectorySearcher doesn't work in such cases??? And if yes - how to
make LDAP calls to such servers in .net 2.0 ???
Best regards, Harald
> >I'm trying to read some data with C# in .NET 2.0. I'm using the Directory
>>classes as follows:
[quoted text clipped - 31 lines]
>
> Marc
Marc Scheuner - 22 Sep 2006 20:50 GMT
>But you are right that the connected server is a sun machine and not a microsoft server. Is it true
>that DirectorySearcher doesn't work in such cases??? And if yes - how to make LDAP
>calls to such servers in .net 2.0 ???
DirectorySEarcher has a lot more problems when hitting non-AD servers.
What you could do is use the native LDAP calls in .NET 2.0, which are
located in the System.DirectoryServices.Protocols namespace - they
should work against any LDAP standard-compliant server, but they are
often less easy and "nice" to use.
Marc
Harald - 26 Sep 2006 10:04 GMT
Hi Marc,
thanks for your tipp with the protocols namespace. I'll try that way...
- Harald
Hi,
my problems seem to be caused by a 1) wrong port number and by 2) an expired
SSL certificate. Examination lead to an better understanding of LDAP. Thanks
for all answers!
- Harald