Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How can I do It faster - LDAP AxtiveX

1 view
Skip to first unread message

Ralph Wentz

unread,
Nov 22, 2006, 12:02:42 PM11/22/06
to
Hello,

My programm-snip removes an User and creates a new with the same Name.
I have to do it in a loop for more than 250 Users. (in future nearly 500
Users)
I try it with TLS or clear-text
Every Call of this procedure needs nearly 12 Seconds with clear Text and 17
seconds with TLS.
So my 250 User need a minimum of 50 Minutes to recreate.

I test it with LDAPSERVICES.COM ActiveX Controls, the same procedure needs
0,4 till 0,5 seconds for the procedure. 250 Users will recreated in 133
seconds. But it seems as LDAPSERVICES ActiveX Controlls can't work with
TLS.

It is not possible to delete all of the users first an then to made all of
the user-creates,
because the time, a user isn't existent needs to hold as short as possible.

Did anyone have an idea to make it faster?

Greetings, Ralph

----- Snip:

Set pEntry = CreateObject("NWIDirLib.NWIDirCtrl.1")

pEntry.FullName =
"LDAP://10.2.1.78/ou=IPSEC-Peers,ou=User,ou=Intra,o=nsw"
pEntry.loginname = "LDAP://10.2.1.78/o=nsw/cn=admin"
pEntry.Password = "Passwd1" 'changed
pEntry.TimeLimit = 120
pEntry.Filter = "Router-7"
pEntry.Fields = "cn"
pEntry.MaximumResults = 0
If VLDAPSSL = True Then
pEntry.SecureConnection = True
pEntry.Credentials = "c:\Rootcert.der"
End If

Call pEntry.Connect

On Error Resume Next
pEntry.Entries.Remove
"LDAP://10.2.1.78/o=dioezese/ou=Intra/ou=User/ou=IPSEC-Peers/cn=Router-7"
On Error GoTo 0
pEntry.Disconnect
Set pEntry = Nothing

Set pEntry = CreateObject("NWIDirLib.NWIDirCtrl.1")

pEntry.FullName = "LDAP://10.2.1.78"
pEntry.loginname = "LDAP://10.2.1.78/o=nsw/cn=admin"
pEntry.Password = "Passwd1" 'changed
pEntry.TimeLimit = 120
If VLDAPSSL = True Then
pEntry.SecureConnection = True
pEntry.Credentials = "c:\Rootcert.der"
End If

Call pEntry.Connect

Set Entry =
pEntry.Entries.Add("cn=Router-7,ou=IPSEC-Peers,ou=User,ou=Intra,o=dioezese",
"inetOrgPerson")
Call Entry.SetFieldValue("sn", ZLDIPsecSurname.Value)
Call Entry.SetFieldValue("telephoneNumber", ZLDIPsecDescription.Value)
Call Entry.SetFieldValue("generationQualifier",
ZLDIpsecAktuelleLokationsID.Value)
Call Entry.SetFieldValue("initials", ZLDIPsecDbID.Value)
Call Entry.SetFieldValue("uid", ZLDIpsecRouterID.Value)
Call Entry.SetFieldValue("title", ZLDIPSecIkeProfile.Value)
Call Entry.SetFieldValue("description", ZLDIPSecPeerIDs.Value)
Call Entry.SetFieldValue("l", ZLDIPSecDynamicAddress.Value)
Call Entry.SetFieldValue("street", ZLDIPsecRoute.Value)
Call Entry.SetFieldValue("fullName", ZLDIPSecAdminStatus.Value)
Call Entry.SetFieldValue("language", ZLDIpsecLdapLanguage.Value)
Entry.Update
Call pEntry.Entries.Refresh
pEntry.Disconnect
Set pEntry = Nothing

Network Services Wentz
Ralph Wentz
Neue Unlinger Str. 22
88499 Riedlingen

Tel. 07371/937040
Fax.: 07371/93704-44
Internet: www.wentz.de

Pascal Schmatz

unread,
Nov 27, 2006, 5:55:45 AM11/27/06
to
how about using LDIF file pushed with an ICE tool ?

another question, wouldn't it be possible to run in two pass,

I mean : first creat allusers, then setfield to users

0 new messages