Skip to main content
March 25, 2008
Question

LDAP returns an error

  • March 25, 2008
  • 4 replies
  • 1010 views
I need someone to shed a light here...I have to retrieve all the members from a LDAP directory using coldfusion. But I keep getting a 503 error message that says: Request timed out waiting to execute. I can browse the LDAP directory using a third-party software so it is working fine. I am on CF8.

Code:

<!--- This starts this script as an application --->
<cfapplication name="myapp" sessionmanagement="Yes" sessiontimeout="#CreateTimeSpan(0,0,0,1)#" />

<!--- This tag retrieves all the object classes from the ldap directory--->
<cfldap server="127.0.0.1"
port="1003"
action="query"
name="results"
start="o=CompuSport"
scope="subtree"
filter="(objectclass=organizationalUnit)"
attributes="ou"
maxrows="1" />

<cfdump var="#results#">
This topic has been closed for replies.

4 replies

Participant
March 29, 2008
Hey Ian thanks for that tool link. It's exactly something i've been desperate to find :)
Participating Frequently
March 25, 2008
If there is no username is specified, the LDAP connection will be already anonymous.
Participating Frequently
March 25, 2008
Ravi, you can first try this LDAP Administrator to connect your local LDAP server.

I think if you can connect to "your" LDAP server with any tool like that, it may give some more ideas.
March 25, 2008
I use LDAP Administrator and it lets me connect to it Anonymously. I read the articles your sent me and in them it says that by default all anonymous connections are blocked. The question..how do I add an user/password then?
Participating Frequently
March 25, 2008
I am not sure but as I remember error 503 is about LDAP authorization/authentication problems. You can check your credentials.


March 25, 2008
I am not sure what the problem is but there is no username or password. I have tried Anonymous but no luck whatsoever and try and catch isn't giving me any valueble information. I am clueless.
Participating Frequently
March 25, 2008
I also do not know what would be the way of tracking the problem. But I feel that you first need to learn your LDAP features before starting CF part.

Here are some resources that may give some ideas:

Using LDAP with ColdFusion
http://livedocs.adobe.com/coldfusion/8/htmldocs/LDAP_04.html

Integrating ColdFusion Applications with Microsoft Active Directory
http://www.adobe.com/devnet/server_archive/articles/integrating_cf_apps_w_ms_active_directory.html

I hope these helps.