May 17, 2008
For ColdFusion hosting try HostMySite.com. |
Home /
Groups /
ColdFusion Talk (CF-Talk)
Catching and Displaying Errors with CFLDAP
<cftry>Dawson, Michael 05/09/08 05:25 P Thanks a bunch, I real appreciate your help, it worked just fine!!!Den Made 05/09/08 06:30 P Thanks so much. I real appreciate your help!!!Den Made 05/09/08 06:29 P 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, <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, Thanks a bunch, I real appreciate your help, it worked just fine!!! ----- Excess quoted text cut - see Original Post for more ----- Thanks so much. I real appreciate your help!!! ----- Excess quoted text cut - see Original Post for more ----- . > . ----- Excess quoted text cut - see Original Post for more -----
|
Mailing Lists
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||