MaxGALRows and ANR in OWA
Originally published May 19, 2005
Have you ever done an address book lookup in OWA and wondered why only part of your address book was displayed? And for that matter, wondered how OWA made the choice as to which addresses it put into that list?
By default, OWA will only return 100 results (try to find that documented! - HAH!). For those 100 results, OWA uses something called ANR - ambiguous name resolution - to fill those 100 results up as best it can.
ANR is a big topic, poorly documented as to how it affects OWA and Exchange (well documented for Active Directory), and we won't cover it here - just be aware that it is a way for OWA to attempt to find the results that it thinks are the most relevant to your search (and it often fails).
If your address book is less than 100 entries, you'll never see this problem.
The easiest way to fix the problem (given that we don't have the source code to change OWA's behavior) is to force OWA to return more than 100 results. I'll show you how to do that in just a minute.
Addressing the problem this way has a couple of downsides that you need to be aware of:
1) A query for 100 results places a relatively low load on your Active Directory infrastructure (your Global Catalogs and other domain controllers). As you increase this number, the load on your A/D increases.
2) A corollary of the above - Exchange does not do particularly efficient LDAP queries.
3) Another corollary of the above - if you allow anonymous access to your address book, i.e., over the Internet, this can subject you to denial of service.
4) You can only make this change globally - it affects all Outlook virtual servers for all of your domains.
5) This change isn't documented. (It's done by OWAAdmin, which is how I found it, along with a PSS call.) You may or may not feel comfortable with that.
6) You may not exceed a value of 1,000. If you try, it still restricts you to 1,000.
So, I bumped mine to 500. There are no address books in my environment that have more than 500 entries. Below is the registry change required. After you install the registry change you will need to do an “iisreset” or a reboot to have the change take effect.
Set-MaxGALRows.reg (don't forget the empty line at the end)
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeWEB\OWA]
"MaxGALRows"=dword:000001f4
If you put this into a file named Set-MaxGALRows.reg, then you can either double-click the file, or enter “regedit /s Set-MaxGALRows.reg” from the command-prompt. Or you can add the value via the Regedit GUI.
Standard warnings about the registry apply.
The posting is provided “as is” and conveys no rights.