I need to connect to eDirectory using .NET/C#. Then authenticate users from within the context of the app credential's permissions. I tried Novell.Directory.Ldap.

using (var cn = new LdapConnection())

cn.Connect(server, int.Parse(port));
cn.Bind(appUserDn, appPassword); //throws exception if invalid credentials..

/// Verify user credentials next??

//cn.ValdiateUser(userDn, userPassword); // This is what I want to do as an example..

// This does not validate the user. It only validates the password, so no locked account check.. etc.
var passwordAttr = new LdapAttribute("userPassword", userPassword);
var isValid = cn.Compare(userDn, passwordAttr);

Examples I found require passing the individual's credentials to cn.Bind() instead, but as I stated, I must use the app credentials binding instead. Does anyone know what I am doing wrong?