[Date Prev][Date Next] [Chronological] [Thread] [Top]

Protocol Error with ldap_bind_s


I'm trying to use the C API to connect to  LDAP but I always get a
"protocol error" (return code = 2) when executing the ldap_simple_bind_s
Here is the source, can anyone help me ?

m_LDAP = ldap_init( HOST_IP , LDAP_PORT );
if( m_LDAP == NULL )
     printf("ldap_init error\n");
     return 1;

ulRet = ldap_simple_bind_s( m_LDAP, NULL, NULL) ;
if( ulRet != LDAP_SUCCESS )
     printf("ldap_simple_bind_s <%s> (%d)\n", ldap_err2string(ulRet),
     ldap_unbind( m_LDAP);
     return ulRet;

-> the error message I have is "ldap_simple_bind_s <Protocol Error> (2)"

Any advice would be appreciate, thanks in advance.