It fails on the .findone line. There doesn't seem to be a difference whether I use nothing or empty string.
I talked to an admin and he said despite the documentation (and my tests with softerra) that I must use SSL. Now with SSL, I can connect, but according the logs he sent me, it connects and then immediately disconnects. The error I get is "the server is unwilling
to process the request" New code:
Public Sub LDAP1()
Dim ldapPath
As String =
"LDAP://dbm.i2a2.purdue.edu:636/ou=identify,dc=purdue,dc=edu"
Dim qry As
String = "(uid=sreiche)"
Dim de As DirectoryEntry =
New DirectoryEntry(ldapPath,
"", "", AuthenticationTypes.SecureSocketsLayer)
Dim ds As DirectorySearcher =
New DirectorySearcher(de, qry,
New String() {"puid"})
Dim sr As SearchResult = ds.FindOne()
lblPost.Text = sr.Properties(
"puid")(0).ToString
End Sub
Another issue I found is that when I use LDAPS://, I get the 05 (unknown error) again on the .findone. This is getting frustrating.
PurdueGuy
Member
140 Points
28 Posts
Re: Unknown Error - talking to LDAP not AD
Oct 17, 2005 07:34 PM|LINK
I talked to an admin and he said despite the documentation (and my tests with softerra) that I must use SSL. Now with SSL, I can connect, but according the logs he sent me, it connects and then immediately disconnects. The error I get is "the server is unwilling to process the request" New code:
Public Sub LDAP1() Dim ldapPath As String = "LDAP://dbm.i2a2.purdue.edu:636/ou=identify,dc=purdue,dc=edu" Dim qry As String = "(uid=sreiche)" Dim de As DirectoryEntry = New DirectoryEntry(ldapPath, "", "", AuthenticationTypes.SecureSocketsLayer) Dim ds As DirectorySearcher = New DirectorySearcher(de, qry, New String() {"puid"}) Dim sr As SearchResult = ds.FindOne()
lblPost.Text = sr.Properties(
"puid")(0).ToString End SubAnother issue I found is that when I use LDAPS://, I get the 05 (unknown error) again on the .findone. This is getting frustrating.