Lukas,

In your LDAPsend unit, you liberally use plain string as the datatype. Could 
that be part of the problem? Have you actually tested LDAPsend in D2009?

I created UTF8String variables  and filled them in with literal values but 
still it fails to bind (see code below). I'm sure there's something I don't 
understand. If anyone else knows what I'm doing wrong, please chime in. 

procedure login;

var 
   ldap: TLDAPSend;
   FDomain, FUserName, FPassword, FPort  : UTF8String;

begin
    FDomain := 'domain.local';
    FPort := '636';
    FUserName := 'wel...@domain.local';
    FPassword := 'password';

     ldap := TLDAPSend.Create;
      ldap.TargetHost := (FDomain);
      ldap.TargetPort := (FPort);
      ldap.UserName := (FUserName);
      ldap.Password := (FPassword);
      ldap.Version := 3;
      if FPort = '636' then ldap.FullSSL := True else ldap.fullSSL := False;
      if ldap.Login then
      begin
        Memo1.lines.add('**** Connected to Active Directory Server *******');
      end
      else
        Memo1.lines.add('!!!!! Not Connecting to Active Directory Server -- bad 
socket!!!!!');
  
  if  ldap.Bind then ******* FAILS here *******
  begin
    showmessage('logged in');
  end;
end;

>>> "Lukas Gebauer" <gebyl...@mlp.cz> 8/22/2009 4:03 AM >>>
> I've tried to zero in on the problem with LDAP (against AD). I can connect
> to the AD server just fine, but the LDAPsend.Bind fails. I'm thinking that
> there's an incomplete conversion to Unicode. I see that you do a lot of
> work to construct a suitable string for the send string call (
> Fsock.SendString(BuildPacket(s));). I'd like to supply a literal string
> just to test the code but I don't understand quite what is required. IOW,
> I could compare what your code creates versus what is expected. This is
> the last barrier to my fully moving to Delphi 2009.

LDAP having all data in UTF-8 code. It can be stored in ANSIstring , as 
currect code expecting, but you must generate UTF-8 encoding inside 
ANSIstring without D2009 implicit conversion. Best for this is to use 
synachar unit and their conversion routines. It can produce UTF-8 encoded 
string inside ansistring and pass it into ldapsend properties.

--
Lukas Gebauer.

E-mail: gebau...@mlp.cz 
WEB: http://www.ararat.cz/synapse - Synapse Delphi and Kylix TCP/IP 
Library



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july 
_______________________________________________
synalist-public mailing list
synalist-public@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/synalist-public

-----------------------------------------
Visit www.nyc.gov/hhc

CONFIDENTIALITY NOTICE: The information in this E-Mail may be
confidential and may be legally privileged. It is intended solely
for the addressee(s). If you are not the intended recipient, any
disclosure, copying, distribution or any action taken or omitted to
be taken in reliance on this e-mail, is prohibited and may be
unlawful. If you have received this E-Mail message in error, notify
the sender by reply E-Mail and delete the message. 

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to