Skip to main content
Participating Frequently
November 16, 2009
Question

LDAP Connection issues.

  • November 16, 2009
  • 1 reply
  • 2575 views

I am trying to get connected with the installation's LDAP location where OI am at now.

I used the code example in the documentataion:

-----------------------------------------------------------------------

<cfif IsDefined("form.name")>
    <!--- Check to see that there is a name listed. --->
    <cfif form.name is not "">
        <!--- Make the LDAP query. --->
        <cfldap 
             server = "servername.nase.ds.army.mil"
             action = "query"
             name = "results"
             start = "dc=armyPostName,dc=Installations,dc=nase, dc=ds,dc=army,dc=mil"
             filter = "cn=#name#"
             attributes = "cn,o,title,mail,telephonenumber"
             sort = "cn ASC">
        <!--- Display results. --->
        <center>
        <table border = 0 cellspacing = 2 cellpadding = 2>
            <tr>
                <th colspan = 5>
                    <cfoutput>#results.recordCount# matches found </cfoutput></TH>
            </tr>
            <tr>
                <th><font size = "-2">Name</font></TH>
                <th><font size = "-2">Organization</font></TH>
                <th><font size = "-2">Title</font></TH>
                <th><font size = "-2">E-Mail</font></TH>
                <th><font size = "-2">Phone</font></TH>
            </tr>
            <cfoutput query = "results">
                <tr>
                    <td><font size = "-2">#cn#</font></td>
                    <td><font size = "-2">#o#</font></td>
                    <td><font size = "-2">#title#</font></td>
                    <td><font size = "-2">
                        <A href = "mailto:#mail#">#mail#</A></font></td>
                    <td><font size = "-2">#telephonenumber#</font></td>
                </tr>
            </cfoutput>
            </table>
            </center>
        </cfif>
</cfif>

<form action="#cgi.script_name#" method="POST">
    <p>Enter a name to search in the database.</p>
    <input type="Text" name="name">
    <input type="Submit" value="Search" name="">
</form>

-----------------------------------------------------------------------

The Error that I get is:

-----------------------------------------------------------------------

The following information is meant for the website developer for debugging purposes.
Error Occurred While Processing Request

An error has occured while trying to execute query :[LDAP: error code 1 - 00000000: LdapErr: DSID-0C090627, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, vece ].

One or more of the required attributes may be missing or incorrect or you do not have permissions to execute this operation on the server.
The error occurred in C:\programming\ldapTest\index.cfm: line 17
15 :              name = "results" 
16 :              start = "dc=Stewart,dc=Installations,dc=nase, dc=ds,dc=army,dc=mil" 
17 :              filter = "cn=#name#" 
18 :              attributes = "cn,o,title,mail,telephonenumber" 
19 :              sort = "cn ASC"> 

Resources:

Browser  Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.30729; InfoPath.2; .NET CLR 3.5.30729)
Remote Address  127.0.0.1
Referrer  http://127.0.0.1/ldap/
Date/Time  16-Nov-09 02:08 PM
Stack Trace (click to expand)

Any suggestions.

Thanks in advance,

Gene

    This topic has been closed for replies.

    1 reply

    Inspiring
    November 16, 2009

    Looks like your LDAP server requires a username and password. Try Softera LDAP Browser (http://www.ldapadministrator.com/download.htm) to get connected to the LDAP first, then copy the information you used there to your cfldap tag.

    Participating Frequently
    November 16, 2009

    It will not connect.

    I will assume this is because it is outside of the firewall.

    Quoting Jochem van Dieten <forums@adobe.com>:

    Looks like your LDAP server requires a username and password. Try

    Softera LDAP

    Browser (http://www.ldapadministrator.com/download.htm) to get

    connected to the

    LDAP first, then copy the information you used there to your cfldap tag.

    >

    Inspiring
    November 16, 2009

    Then you know what to fix first