House of Fusion
Home of the ColdFusion Community
Hostmysite VPS Hosting

Search cf-talk

May 17, 2008

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
         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

Subscribe Now
Fusion Authority Quarterly Update - ColdFusion 8 Special Edition

For ColdFusion hosting try HostMySite.com.
Search over 2,500 ColdFusion resources here  >>>      
Home /  Groups /  ColdFusion Talk (CF-Talk)

Catching and Displaying Errors with CFLDAP

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Den Made
05/09/2008 03:45 PM

Error updating the server MyServer:389. The error is javax.naming.directory.InvalidAttributeValueException: [LDAP: error code 19 - invalid password syntax: no special character]; remaining name 'uid=testuser,ou=ME,dc=example,dc=com' I am connecting to Sun One Directory Server 6.0 on Windows Server 2003 through ColdFusion as per our project's requirement. I use the code that is given below: <cfparam type="string" name="LoginMessage" default=""> . . <cftry> <cfldap action="QUERY" name="AunthenticateUser" attributes="uid " start="ou=People,dc=example,dc=com" Scope="subtree" filter = "(&(objectclass=person) (uid=#form.UserLogin#))" server="#ldap_server#" Port="#ldap_port#" username="uid=#form.UserLogin#,ou=People,example,dc=com" password="#form.userpassword#"> <cfcatch type="any"> <cfoutput> //what I want to display Your Password expired </cfoutput> <cfabort> </cfcatch> </cftry> I use a Global Password Policy with the following properties: General, Password Change, Password Expiration, Account Lockout. How do I catch the LDAP: error code 19 in the <cftry> <cfcatch> block so that I can tell the client that their password syntax is wrong?. Thanks,

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dawson, Michael
05/09/2008 05:25 PM

<cftry> <cfldap...> <cfcatch>       <cfdump var="#cfcatch#">       <!--- Look for the cfcatch struct var that contains the error message ---> </cfcatch> </cftry> Once you find the cfcatch struct var, use it in a CFIF block inside the CFCATCH block. m!ke Error updating the server MyServer:389. The error is javax.naming.directory.InvalidAttributeValueException: [LDAP: error code 19 - invalid password syntax: no special character]; remaining name 'uid=testuser,ou=ME,dc=example,dc=com' I am connecting to Sun One Directory Server 6.0 on Windows Server 2003 through ColdFusion as per our project's requirement. I use the code that is given below: <cfparam type="string" name="LoginMessage" default=""> .. .. <cftry> <cfldap action="QUERY" name="AunthenticateUser" attributes="uid " start="ou=People,dc=example,dc=com" Scope="subtree" filter = "(&(objectclass=person) (uid=#form.UserLogin#))" server="#ldap_server#" Port="#ldap_port#" username="uid=#form.UserLogin#,ou=People,example,dc=com" password="#form.userpassword#"> <cfcatch type="any"> <cfoutput> //what I want to display Your Password expired </cfoutput> <cfabort> </cfcatch> </cftry> I use a Global Password Policy with the following properties: General, Password Change, Password Expiration, Account Lockout. How do I catch the LDAP: error code 19 in the <cftry> <cfcatch> block so that I can tell the client that their password syntax is wrong?. Thanks,

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Den Made
05/09/2008 06:30 PM

Thanks a bunch, I real appreciate your help, it worked just fine!!! ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group

<< Previous Thread Today's Threads Next Thread >>

Mailing Lists