Hi!

I'm trying to connect with a LDAP. My code:
Code:
if (ldapssl_client_init(strFile + "\\cert7.db", NULL) < 0)
		{ 
			throw new CLoginException (IDS_LDAP_CONNECTION_ERROR);
			bRetcode = FALSE; 
		}
		// First setup a LDAP connection 
		if ( (ld = ldapssl_init(sHost,nPort,1 )) == NULL ) 
		{ 
			throw new CLoginException (IDS_LDAP_CONNECTION_ERROR);
			bRetcode = FALSE; 
		}

int nRes = ldap_simple_bind_s( ld, "uid=foroadmin,o=FORO,c=es", "foroadmin" );

	if ( nRes != LDAP_SUCCESS ) 
	{ 
		throw new CLoginException (IDS_LDAP_CONNECTION_ERROR);
		bRetcode = FALSE; 
	}
When I try to call ldap_simple_bind_s, I get the error LDAP_SERVER_DOWN = "Can't contact ldap server". How could be the problem?
I have a program called "LDAP browser", and with that program all is fine.
Any ideas?