Using global catalog in a ldap search with C# library Novell

741 views Asked by At

Until now I was always using the System.DirectoryServices in my c# application. Due to the fact that I want to use a container platform which doesn't support this library I wanted to use the Novell LDAP library.

Until now the connection string looked like this:

new Directoryentry("GC://domain.com")

I tried it with the Novell library like this:

LDAPConnection().connect("GC://domain.com",389);

I always get the error message "INVALID ADDRESS". I also tried it without the GC infront of the domain, but then I always get an empty search result.

Could someone please help me? Thanks!

1

There are 1 answers

0
Gabriel Luci On

The global catalog (GC) uses port 3268, not 389. You usually either use GC://, which sets the port for you, or use LDAP:// along with specifying the port. It depends on the library. If the Novell library doesn't support GC://, then just specify the port. According to the documentation, it doesn't seem to even require LDAP://, but I've never used it.

LDAPConnection().connect("example.com", 3268);