Thanks, we have authentication issues sometimes, it is completely random.
Where we also have big issues is getting CFLDAP in MX(works find in CF5) to
return things like large record sets. Today I was looking at one that on the
CF5 server always returns 6200 records, on the MX it will return 3300-3600
records. Same code on both to the same server.
On 11/9/05, Douglas Knudsen <[EMAIL PROTECTED]> wrote:
>
> we have issues with CFLDAP also. We are 99% they have to do with the
> LDAP server. THe issues are timeout related. I wrote my own LDAP
> auth code in Java and tested that instead of CF's CFLDAP and got the
> same time out issues. Maybe you will have better luck.
>
> how your LDAP is used will vary, but here is a code snip for
> connecting and getting the DN
>
> some vars
> securityAuthentication = "simple"
> ldapHost=urltoyourldap
> username=someuserid <-- depends on your ldap
>
>
>
> Properties env = new Properties();
> env.put("java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory
> ");
> env.put("java.naming.provider.url", ldapHost);
> env.put("java.naming.security.principal", "");
> env.put("java.naming.security.credentials", "");
> env.put("java.naming.security.authentication", securityAuthentication);
>
> try {
> DirContext ctx = new InitialDirContext(env);
> SearchControls ctls = new SearchControls();
>
> String[] returnAttribute = {"dn","cn","employeeNumber","uid"};
> ctls.setSearchScope(2);
> ctls.setReturningAttributes(returnAttribute);
> ctls.setCountLimit(2);
>
> NamingEnumeration answer = ctx.search("ou=people,o=YOURORG",
> "(&(objectClass=Person) (uid="+username+"))", ctls);
>
> if (answer.hasMore()) {
> SearchResult sr = (SearchResult)answer.next();
> Attributes attrs = sr.getAttributes();
> employeeNumber = (String)attrs.get("employeeNumber").get();
> userDn = "employeenumber=" + employeeNumber + ", ou=people, o=YOURORG";
> LoggerService.createDefaultLogger().logWarning(RB.getString(this,
> "got the DN", userDn));
>
> }
> ctx.close();
> } catch (NamingException e) {
> throw new LoginException(e.getMessage());
> } catch (Exception e ) {
> throw new LoginException(e.getMessage());
> }
>
> On 11/9/05, Aaron Rouse <[EMAIL PROTECTED]> wrote:
> > I would not mind seeing an example of that. We have certainy had our
> fair
> > share of LDAP issues since upgrading to 6.1 from 5.0
> >
> > On 11/9/05, Douglas Knudsen <[EMAIL PROTECTED]> wrote:
> > >
> > > workaround? write your LDAP call in Java...a bit of work but not too
> > > terribly difficult.
> > >
> > > DK
> > >
> > >
> >
> >
> >
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble
Ticket application
http://www.houseoffusion.com/banners/view.cfm?bannerid=48
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223778
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54