c# - how to secure password during ldap connection -


I have developed an MVC application, where I am using ldap authendication to validate the user, I need a help to secure the LDAP connection, I have tried the sequestrelter = true, but I think that this certificate is required, it is giving an error, handshake failure SSL is my code here by my security team One tenth Ppni getting, are sent in clear text over the network to the user authentication credentials. Anybody helps me how to achieve it in LDAP.

This is my code I

  using LdapConnection = Novell.Directory.Ldap.LdapConnection; Using LdapException = Novell.Directory.Ldap.LdapException; Var ldapHost = WebConfigurationManager.AppSettings ["LDAP_HOST"]; Var ldapPort = WebConfigurationManager.AppSettings ["LDAP_PORT"]; Var Connection = New LdapConnection {SecureSocketLayer = true}; Connection Connect (ldapHost, Convert.ToInt32 (ldapPort)); Sb = new stringbilder (); Sb.Append (ldapLocation) .Append (user name) .Append (",") enclosed (ldapLocationIndia). Connection.Bind (LdapConnection.Ldap_V3, sb.ToString (), password);  

Thanks in advance


Comments