| Author |
Query LDAP server using .NET 2
|
|
|
| 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.
| |
|
| 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?
| |
|
| 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 !! |
|
|
|