|
| How can I do It faster - LDAP AxtiveX |
 |
Wed, 22 Nov 2006 17:02:42 GMT |
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&qu
ot;
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&
quot;,
"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
|
| Post Reply
|
| Re: How can I do It faster - LDAP AxtiveX |
 |
Mon, 27 Nov 2006 10:55:45 GMT |
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
Ralph Wentz wrote:
> 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&qu
ot;
> 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&
quot;,
> "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
|
| Post Reply
|
|
|