Posted on: 5/4/2011 2:02:10 AM | Views : 292

I was recently tasked with validating users on an exeternal ldap server. However all the code samples I have seen assume your AD is on a local domain.
All of these examples user the directoryentry object which expects a username and password as a path to your domain's active directory server.
 
For example,
Dim adPath As String = "LDAP://acmeco.local"
 
Dim adAuth As LdapAuthentication = New LdapAuthentication(adPath)


            If (True = adAuth.IsAuthenticated("DOMAIN", txtUsername.Text, txtPassword.Text)) Then
                Dim groups As String = adAuth.GetGroups()

                'Create the ticket, and add the groups.
          &n ...

Go to the complete details ...