Thursday, December 5, 2013

Unable to search GAL with less than 4 characters via Exchange Server 2010 ActiveSync

Problem

You attempt to search the Global Address List (GAL) via a phone that uses Exchange Server 2010 ActiveSync but notice that the search fails when you search with 3 characters or less:

image image image

**Note that the screenshots above are from a Blackberry z10 device’s Look up… feature.

Searching with 4 characters or more works as expected:

image image image

Reviewing the IIS Logs on the CAS server in the directory:

C:\inetpub\logs\LogFiles\W3SVC1

image

Reveals the following:

2013-12-05 14:11:43 10.64.16.20 POST /Microsoft-Server-ActiveSync/default.eas Cmd=Search&DeviceType=BlackBerry&User=contoso.com%5CKAB&DeviceId=BB24D90407&Log=V140_LdapC8_LdapL15_RpcC14_Pk4017638333_Error:SearchStringTooShort_Pic0_SrchL2_As:AllowedG_Mbx:contosoBDAMS01.contoso.com_Dc:contosoBDADC01.contoso.com_Throttle0_Budget:(A)Conn%3a0%2cHangingConn%3a0%2cAD%3a%24null%2f%24null%2f1%25%2cCAS%3a%24null%2f%24null%2f0%25%2cAB%3a%24null%2f%24null%2f0%25%2cRPC%3a%24null%2f%24null%2f0%25%2cFC%3a1000%2f0%2cPolicy%3aDefaultThrottlingPolicy%5Ffafb1bd7-839a-4db2-b37c-7ef5a58823d0%2cNorm_ 443 contoso.com\KAB 10.64.16.17 RIM-Z10-STL100-1/10.1.0.4633 200 0 0 265

image

The text that identifies the search string too short in the log is:

Error:SearchStringTooShort

Solution

A bit of research on the internet revealed that in Exchange Server 2010, the default minimum amount of characters required to search the GAL via ActiveSync is 4 characters instead of 2 which is the default setting for Exchange 2003 (the Exchange 2007 organization I had to troubleshoot also exhibited the same behavior). As a result of this change, attempting to search with 3 or less characters on a BES 10 device which uses a BES 10 server that uses ActiveSync to retrieve information from Exchange Server 2010 would fail.  To correct this issue, edit the web.config file on all of the CAS servers at the following directory:

C:\Program Files\Microsoft\Exchange Server\V14\ClientAccess\Sync

image

Backup the web.config file prior to making the change:

image

Locate the <appSettings> section:

image

Add the following text with the appropriate value desired (we’ll use 2 for this example to allow searching with 2 characters) between the <appSettings> and </appSettings> tag as such:

<!-- Sets the minimum number of characters required for searching -->

<add key="MinGALSearchLength" value="2"></add>

image

Perform a iisreset command on the CAS server once the changes have been made:

image

Searches with 2 characters should now work:

image image image

Hope this helps anyone who may come across this issue.

1 comment:

Anonymous said...

Perfect, thanks for posting this. Happening to me after doing an upgrade to Exchange 2010 SP3 so the web.config file must have been overwritten.