|
Marc, I would also STRONGLY recommend you don’t
do this, the amount of overhead you have on your server for one and the time
taken to return the results will really make life a nightmare. You have been provided with the link to
the paging example, this is the best practice to use. It is not uncommon that
ppl change the paging size. I just have been bitten way too many times. It can
even be used as a DOS attack :P Al, the code does no actually create a
bind to the directory until findall() or Findone() is called. During the process of Dim entry As New mysearcher.Filter =
"(&(objectCategory=user)(objectCategory=person))" Dim results As SearchResultCollection You are merely setting properties on the
directoryentry and directorySearcher object. ldap_bind_s (_s is because it’s
a secure connection) the LDAP API bind call only really happens at “results = mysearcher.FindAll” (through the ADSI COM object). This is supposedly done to
prevent premature or unnecessary (i.e. if an error occurs) binding to the
directory. I hope that is understandable and explains
the situation to you correctly… LDAP
(Active Directory , iPlanet, NDS?) programming?
From: joe
[mailto:[EMAIL PROTECTED] NO do not do this. Incorrect answer. The proper way to handle this is to
specify a page size in the calls to active directory, something less than 1000
and then retrieve the data in multiple pages. I would hate to see someone slowly
increasing the page size on their server as the number of objects gets higher
and higher. Heck I would have to set the page size to > 100,000 on one of my
domains to return all the users and I would hate to see how long that query
would run and how dead the DC would be trying to buffer that queries return
set. joe From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Clay Perrine Per RFC the LDAP query limit is 1000
items. You can change that limit to reflect the additional number of items that
you want to return. This is done with the ntdsutil
utility. Use the LDAP policies. Change the MaxPageSize value. Clay Perrine, MCSE Microsoft Directory Services Support Team From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of De Schepper Marc Thanks Carlos, It works, But it only gives me the first
1000 users. Any Idea how I can see more than that? I've gat about 2000 Users. Marc From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carlos Magalhaes Hello
Marc, Welcome
to the world of System.DirectoryServices. Could you please post the extended
error to the list? Just a
few things, 2. It is
best practice to actually load the required properties into the search, you can
load them one by one or you can load a property array. For example loading 1 by
1 = mysearcher.PropertiesToLoad.Add("cn") or an array =
mysearcher.PropertiesToLoad.AddRange(MYSTRINGARRAY) 3. Also
as a good practice instead of doin result.findall at the loop level rather try
this Then in
your loop try
For Each result In results The
reason you should use .Contains is because if the property does not contain a
value you will receive and error = Object not set to an instance... As a test
could you specify a username , password and authentication type in the
directoryentry. For
example This is
just to perform a test we can change this later. Let us
know about the extended error. You have obviously checked that the LDAP path is
correct (sorry but I have to ask: P) Active
Directory Programming ? - http://groups.yahoo.com/group/adsianddirectoryservices
-----Original
Message----- Hey all,
I'm
trying to walk my first steps in .NET Visual Basic and I want to Is there
someone who could help me with a simple sample app in ASP.NET I wrote
some code, but running it from my WS returns me an error teeling This is
the code I used PLEASE
Help
Dim entry As New
User1.DataSource = oValue Thx
Dit
e-mail bericht inclusief eventuele ingesloten bestanden This
e-mail and any attachment thereto may contain information which is confidential
and/or protected by intellectual property rights and are intended for the sole
use of the addressees. Any use of the information contained herein (including
but not limited to total or partial reproduction or distribution in any form) by
other persons than the addressees is prohibited. If you have received this
e-mail in error, please notify the sender and delete its contents. *************************************************************
|
------------------------------------------------------------- This email and any files transmitted are confidential and intended solely for the use of the individual or entity to which they are addressed, whose privacy should be respected. Any views or opinions are solely those of the author and do not necessarily represent those of the Trencor Group, or any of its representatives, unless specifically stated.
Email transmission cannot be guaranteed to be secure, error free or without virus contamination. The sender therefore accepts no liability for any errors or omissions in the contents of this message, nor for any virus infection that might result from opening this message. Trencor is not responsible in the event of any third party interception of this email. If you have received this email in error please notify [EMAIL PROTECTED] For more information about Trencor, visit www.trencor.net <http://www.trencor.net>
