Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing the Active Directory (AD) from Delphi

Status
Not open for further replies.

Kenbla

Programmer
Oct 11, 2006
68
SE
Hello, I'm responsible for a Delphi XE application which handles users and user administration. It accesses the AD when users are added, modified or when new passwords are set etc.
All these methods are very slow! It takes minutes to perform them sometimes up to 10-15 minutes which is very frustrating for the users.
The AD methods we use from our Delphi application are:
- NetUserSetInfo (defined in netapi32.dll)
- SetInfo
There are also some other AD methods that we use.
I pass parameters to the methods accordingly and it works fine but it takes forever!

Does anyone of you have any advice and/or recommendations to us?
Thanks,
Kenbla
 
Not certain what it could be.
If I were you I would run some wireshark traces on a client PC running your app and see if there is some SSL handshaking going on in the background, SSL handshakes are known to be very slow.
Are you using the LDAP provider or WinNT provider?

/Daddy

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
Hi Daddy! and thanks for your reply.
We use LDAP.
 
try to use WinNT is much faster...

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
I have verified my code once again and discovered that we are using a combination of WinNT and LDAP! and I don't know if that's good or bad!
Are there any major code changes that I have to do if I want to use WinNT instead of LDAP?
My LDAP code currently looks like this:
AdsDomain := GetObject('LDAP://cn=users,DC='+sDomainName +',DC=se') as IADsContainer ;
DomainPath := 'LDAP://OU='+sInputOU+',DC='+sInputDomainName+',DC=se';
AdsDomain := GetObject('LDAP://'+sInputDomainName+'.se') as IADsContainer ;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top