For Programmers: Free Programming Magazines  


Home > Archive > C# > November 2006 > Query LDAP server using .NET 2









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Query LDAP server using .NET 2
hc

2006-01-11, 7:01 pm

Hi,
I am trying to connect to and query an ldap server running on suse 10
using visual studio .net 2. I have found a large number of samples and
examples on the internet and when i wirte and run them they say they
are connected but I am then not able to query the server or return any
results.

If anybody has any tips or websites that would be useful then they
would be greatly appreciated.

hc

2006-01-12, 7:04 pm

I have managed to get this to work using .NET 1.1 and using the exact
same code on .NET 2.0 it errors on the line:

System.DirectoryServices.SearchResultCollection results =
deSearch.FindAll();

creating the exception:
"The requested authentication method is not supported by the server."

does this mean i need to change the authentication type used when
creating the connection because I am passing in the correct username
and password.

Has anybody else had this problem?

hc

2006-01-12, 7:04 pm

You can all ignore this now I only needed to add:

de.AuthenticationType =
System.DirectoryServices.AuthenticationTypes.ServerBind;

where 'de' is my System.DirectoryServices.DirectoryEntry, and it all
works fine.

oddball

2006-11-09, 2:47 pm

quote:
Originally posted by hc
You can all ignore this now I only needed to add:

de.AuthenticationType =
System.DirectoryServices.AuthenticationTypes.ServerBind;

where 'de' is my System.DirectoryServices.DirectoryEntry, and it all
works fine.



Dude you just saved my ass - THANKS A BILLION !!
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com