In Chapter 4, in the section titled Returning Many Results with Paged Searches, we briefly mentioned an LDAP query policy called MaxPageSize. As it turns out, MaxPageSize is just one of many policies enforced by Active Directory and ADAM that can affect the behavior of our searches. Since the server enforces these policies, they always override any settings requested by the client when sending a search request.
As such, it is important for developers to know which settings will have an impact on their code. Table 5.1 summarizes the limits.
Value |
Description |
Default |
---|---|---|
InitRecvTimeout |
Initial Receive Timeout. This is the amount of time a server will wait for the client to send the initial request after receiving a new connection. |
120 seconds |
MaxConnections |
Maximum open connections allowed. Any connections after this limit mean that another connection will be dropped. |
5,000 connections |
MaxConnIdleTime |
Maximum amount of time an open connection can be idle before disconnection. |
900 seconds |
MaxActiveQueries |
Maximum number of queries that will execute at one time. If this limit is reached, subsequent queries will receive a "busy" notification error. |
20 queries |
MaxNotification-PerConnection |
Maximum number of notifications a client can request per connection. Client will receive a "busy" error when this limit is exceeded. |
5 notifications |
MaxPageSize |
Maximum number of results returned per page. If the number of selected results exceeds this value, only this limit is returned, unless paging is performed. If paging is used, this limit is enforced per page. |
1,000 results |
MaxQueryDuration |
Maximum length of time a query can execute. If this limit is exceeded, a timeLimitExceeded error will be raised. To exceed this limit, paging must be used, but then this limit is enforced per page as well. |
120 seconds |
MaxTempTableSize |
Maximum size of temporary storage allocated for queries. This storage is used to sort and select intermediate results. A size smaller than the expected result set will result in decreased performance. |
10,000 results |
MaxResultSetSize |
Maximum size of the intermediate data stored in a paged search. The server might store this intermediate data between pages in a paged search to speed subsequent pages. When this value is exceeded, the server will discard older data. |
262,144 bytes |
MaxPoolThreads |
Maximum number of threads created for query execution and listening for network input/output. This is a per-processor value. |
4 per CPU |
MaxDatagramRecv |
Maximum size of a datagram that can be processed. Datagram requests larger than this limit will be discarded. |
1,024 bytes |
Part I: Fundamentals
Introduction to LDAP and Active Directory
Introduction to .NET Directory Services Programming
Binding and CRUD Operations with DirectoryEntry
Searching with the DirectorySearcher
Advanced LDAP Searches
Reading and Writing LDAP Attributes
Active Directory and ADAM Schema
Security in Directory Services Programming
Introduction to the ActiveDirectory Namespace
Part II: Practical Applications
User Management
Group Management
Authentication
Part III: Appendixes
Appendix A. Three Approaches to COM Interop with ADSI
Appendix B. LDAP Tools for Programmers
Appendix C. Troubleshooting and Help
Index