LDAP - Same error ever time

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default LDAP - Same error ever time

    I need to make my first CFM file to read from an LDAP server.

    All I ever get is Connection to LDAP Server failed errors.

    I've gotten complete code to do an LDAP retrieval, a number of times, and I
    always seem to get the same error. This is code to access public LDAPs. Some of
    the code I gotten right from CF documentation.

    Ideas on this?

    For example, here is the code for my last attempt.
    Thanks!
    Howard Perlman
    US Geological Survey

    <html><body>
    <h3>cfldap Example</h3>
    <p>Provides an interface to LDAP directory servers. The example uses the
    University of Connecticut public LDAP server. For more public LDAP servers,
    see <a href="http://www.emailman.com">http://www.emailman.com</a>.</p>
    <p>Enter a name and search the public LDAP resource.
    An asterisk before or after the name acts as a wildcard.</p>
    <!--- If form.name exists, the form was submitted; run the query --->
    <cfif IsDefined("form.name")>
    <!--- check to see that there is a name listed --->
    <cfif form.name is not "">
    <!--- make the LDAP query --->
    <cfldap
    server = "ldap.uconn.edu"
    action = "query"
    name = "results"
    start = "dc=uconn,dc=edu"
    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>
    </body>
    </html>


    Howard Perlman Guest

  2. Similar Questions and Discussions

    1. Odd LDAP Error when testing config
      I'm stuck and hoping someone might have an idea what's going on. I deployed the CPS as a WAR onto our Oracle Application Server, since that's what...
    2. Size Limit Exceeded error when querying ldap
      I am receiving the following error when trying to use ldap to return a list of email addresses from outlook. If I put in a filter the error goes...
    3. Error when using ldap query
      I am trying to do an LDAP query an AD group. I already have one that queries the same server, and works. But on my new query I get the following...
    4. error 80005000 when querying LDAP
      I'm using ASP and CDO to lookup free busy time on an e2k server. The E2K is locally installed on the IIS server and I'm having no problems...
    5. Error Access LDAP from outside the Network with authenticated User
      Im using IIS and ASP and am forcing user authentication. I have the webserver in the same forest as the LDAP server, but the domain that the LDAP...
  3. #2

    Default Re: LDAP - Same error ever time

    I had the same problem, but it happend it was not the cfladp but in the way my
    network is setup,
    I had to try several way to connect
    server = "servername.com" or server = "123.45.678 or server = "Machine_name"
    or the user = "username" or user = "username@servername.com" or user =
    "Machine_name/username"

    instialling a local Ldap prgram in your PC can help you find what is the
    correct connection
    I use softterra ldap browser it is free
    [url]http://www.ldapbrowser.com/[/url]

    jorgepino Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139