By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,591 Members | 629 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,591 IT Pros & Developers. It's quick & easy.

DirectorySearcher protocol error with Notes Domino directory

P: 12
Using Studio 2013 VB.

I am attempting to retrieve group members from our Lotus Notes Domino directory - but I cannot get past this error: "A protocol error occurred. Failed, invalid authentication method specified." I was assuming (maybe incorrectly) that this could be done using DirectorySearcher as we do for our Active Directory.

I have tried retrieving various data with the same results. My research seems to indicate a problem with the ldapsettings but I am using the same alias and specific ldapsettings used by other in-house scripts (albeit written in perl). So the ldapsettings still might be the problem.

The line of code that fails is:
Expand|Select|Wrap|Line Numbers
  1. Dim result As SearchResult = searcher.FindOne
The value of searcher.Filter is (&(objectclass=dominoGroup)(cn=mydominogroup)) So this looks like it is build right.

Any help with errors in my code - or even suggestions to accomplish this task a better way are appreciated.

Here is my code:
Expand|Select|Wrap|Line Numbers
  1. dim grp as String = "mydominogroup"
  2. Using dEntry As New DirectoryEntry("LDAP://mycompanyldapsettings")
  3.    dEntry.Username = myadminaccount
  4.    dEntry.Password = myadminpassword
  6.    Using searcher As New DirectorySearcher(dEntry)
  7.       searcher.Filter = String.Format("(&(objectclass=dominoGroup)(cn={0}))", grp)
  8.       Dim result As SearchResult = searcher.FindOne <--fails here
  9.       If result Is Nothing Then
  10.           "report group not found"
  11.       Else
  12.            Dim members As Object = result.GetDirectoryEntry.Invoke("Members", Nothing)
  13.            If members Is Nothing Then
  14.                "report no members found in group"
  15.            Else
  16.                For Each member As Object In CType(members, IEnumerable)
  17.                   Dim currentMember As New DirectoryEntry(member)
  18.                   If currentMember.SchemaClassName.ToLower = "user" Then
  19.                         Dim props As PropertyCollection = currentMember.Properties
  20.                         "get and list the user pros("someattribute").Value)"
  21.                   End If
  22.                Next
  23.            End If
  24.       End If
  25.    End Using
  26. End Using
Jul 17 '14 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.