This is the calling page. [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => murpg [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 3 [islastshown] => 1 [isfirstshown] => [attachments] => [allattachments] => ) --> LDAP Connect Problem - Coldfusion - Advanced Techniques

LDAP Connect Problem - Coldfusion - Advanced Techniques

I am getting this LDAP connection error. 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]. I have verifyed that I am in the correct user group to have access. The strange thing is that when I try to connect using test users, the error message is not thrown....

  1. #1

    Default LDAP Connect Problem

    I am getting this LDAP connection error.

    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].

    I have verifyed that I am in the correct user group to have access. The
    strange thing is that when I try to connect using test users, the error message
    is not thrown.

    murpg Guest

  2. #2

    Default Re: LDAP Connect Problem

    Can you please attach the code both with test users and with a real user, i.e.
    what are the differences? Don't say, there are no differences. For a
    select-type CFLDAP usually anonymous bind is ok, so let's see what you are
    actually trying to do.

    Also, does either ldapsearch or ldap.exe work?

    yalta Guest

  3. #3

    Default Re: LDAP Connect Problem

    Hi guys, I am trying to use LDAP as a web service. Here is what I ultimately
    want to do. When users go to different ColdFusion applications I would like for
    this application to be able to authenticate them by invoking a CFC component as
    a web service. I have been able to make successful calls when I set the access
    attritube of the function to public. I have not been able to make a successful
    connection when I set the function to web services and access to remote. I keep
    getting this error message.

    Web service operation "SearchPerson" with parameters
    {Form.Password={xx},getGroup={},For m.username={xx},} could
    not be found.

    Here is my code for the Component. I suspect this needs to be called in a
    different way. Please note that the method getMessage works fine.

    Here is component and calling page:


    Attach Code

    <cfcomponent displayname="LDAPComponent" hint="Component used to access LDAP">
    <cffunction name="SearchPerson" access="remote" output="0" returntype="query">
    <cfargument name="cfcName" type="string" required="false">
    <CFTRY>
    <CFLDAP ACTION = "QUERY"
    NAME = "userSearch"
    ATTRIBUTES = "#attributes#"
    START = "#root#"
    SCOPE = "SUBTREE"
    SERVER = "#LDAP_SERVER#"
    PORT = "#LDAP_PORT#"
    FILTER = "#filter#"
    USERNAME = "#LDAP_username#"
    PASSWORD = "#LDAP_password#">

    <CFCATCH TYPE = "ANY">
    <CFSET Session.UserSearchFailed = 1>
    </CFCATCH>
    </CFTRY>

    <!------------ If error or no match for username ----------------->
    <CFIF (NOT userSearch.recordcount)>
    <CFSET UserSearchFailed = 1>
    </CFIF>

    <!--- pass the user's DN and password to see if the user authenticates --->
    <CFTRY>
    <CFLDAP ACTION = "QUERY"
    NAME = "auth"
    ATTRIBUTES = "#attributes#"
    START = "#root#"
    SCOPE = "SUBTREE"
    FILTER = "#filter#"
    SERVER = "#LDAP_SERVER#"
    PORT = "#LDAP_PORT#"
    USERNAME = "#userSearch.dn#"
    PASSWORD = "#Form.Password#">

    <CFCATCH TYPE = "ANY">
    <CFSET UserSearchFailed = 1>
    </CFCATCH>
    </CFTRY>

    <!--- If ldap query returned the user is not valid --->
    <CFIF (NOT IsDefined("auth")) OR auth.RecordCount LTE 0>
    <CFSET UserSearchFailed = 1>
    </CFIF>

    <CFLDAP ACTION = "QUERY"
    NAME = "groupSearch"
    ATTRIBUTES = "cn,member"
    START = "#root#"
    SCOPE = "SUBTREE"
    SERVER = "#LDAP_SERVER#"
    PORT="#Variables.LDAP_PORT#"
    FILTER="(&(objectclass=*)(#Form.getGroup#))"
    USERNAME = "#LDAP_username#"
    PASSWORD = "#LDAP_password#">



    <cfif NOT FindNoCase(userSearch.cn, groupSearch.member)>
    <CFSET UserSearchFailed = 1>
    </cfif>
    <cfreturn userSearch>
    </cffunction>
    <cffunction name="getMessage" access="remote" returntype="string"
    output="false">
    <cfargument name="name" type="string" required="yes">
    <cfreturn "Hello " & arguments.name &"! " & "you have just invoked a web
    service.">
    </cffunction>
    </cfcomponent>

    This is the calling page.

    <cfif ISDefined("Form.Login")>
    <cfinvoke
    webservice="http://localhost:8500/gmprojects/ldapconnect_queryreturn.cfc?wsdl"
    method="SearchPerson"
    returnvariable="SearchPersonRet">
    <cfinvokeargument name="Form.username" value="#Form.username#">
    <cfinvokeargument name="Form.Password" value="#Form.Password#">
    <cfinvokeargument name="getGroup" value="#Form.getGroup#">
    </cfinvoke>
    <cfinvoke
    webservice="http://localhost:8500/gmprojects/ldapconnect_queryreturn.cfc?wsdl"
    method="getMessage"
    returnvariable="getMessageRet">
    <cfinvokeargument name="name" value="#SearchPersonRet.cn#"/>
    </cfinvoke>
    </cfif>


    murpg Guest

Similar Threads

  1. W2K AD LDAP Problem
    By xyzbytes in forum Macromedia Contribute Connection Administrtion
    Replies: 0
    Last Post: September 28th, 05:01 PM
  2. LDAP and ASP - Problem
    By Treml Juergen in forum ASP Database
    Replies: 7
    Last Post: September 24th, 11:05 AM
  3. Ldap will not connect to domain controller
    By Aaron in forum Windows Networking
    Replies: 6
    Last Post: July 31st, 10:22 PM
  4. slapd & openldap // can't connect to ldap server
    By Andreas in forum Linux Setup, Configuration & Administration
    Replies: 0
    Last Post: June 24th, 10:48 PM

Bookmarks

Posting Permissions

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