Windows Mobile 6.1 y IPhone: Problema publicando Activesync con ISA 2000

Por Daniel Seveso / Alessandro Goncalves

Con el lanzamiento de los nuevos modelos de dispositivos con soporte de ActiveSync para sincronizar con Microsoft Exchange 2003 SP2, como el Mobile 6.1 y el nuevo IPhone, hemos tenido algunos llamados de soporte por el siguiente problema en su configuración inicial. Este problema afecta a las empresas usando Microsoft ISA Server 2000.

Síntoma

En Windows Mobile 6.1 se genera una excepción en repllog.exe.
Para el iPhone se genera un error "Exchange account verification failed"

Si habilitas el verbose logging de ActiveSync en el dispositivo WM6.1 verás lo siguiente:

=-=- [23/07/2008 13:40:0254.000] -=-=
=-=-=-= Client Request =-=-=-=
OPTIONS Microsoft-Server-ActiveSync?User=usuario1&DeviceId=BAD73E6E02156460E800185977C03182&DeviceType=PocketPC
User-Agent: MSFT-PPC/5.2.1000

-=-=-=- Start of Body -=-=-=-

=-=- [23/07/2008 13:40:0255.000] -=-=
=-=-=-= Server Response =-=-=-
HTTP/1.1 200 OK
Content-Length: 0
Date: Wed, 23 Jul 2008 19:11:23 GMT
Public: GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, CONNECT
Allow: GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, CONNECT
Cache-Control: private

Sin embargo el comando POST lo está contestando ISA y no Exchange. Si revisas en tu servidor de Exchange, no verás el comando POST en el IIS log.

Causa

La publicación de ActiveSync a través de ISA Server 2000 filtra el verbo WebDav OPTIONS al servidor de Exchange, generando un error en los dispositivos de última generación. (Windows Mobile 5.0 y anteriores funcionan correctamente)

Solución

Tienes que habilitar la siguiente clave de registro en tu servidor de ISA Server para evitar el filtrado del verbo OPTIONS. Luego reinicias el servidor de ISA Server.

HKLM\System\CurrentControlSet\Services\W3Proxy\Parameters
Value Name: PassOPTIONSToPublishedServer
Data Type : REG_DWORD
Data : 1

Debes tener al menos Service Pack 1 de ISA Server para que esta clave funcione.
Esta entrada la encuentras documentada en el siguiente artículo:

304340 The ISA Server response to client options requests is limited to a predefined set

Verificación

Una vez que reinicias el ISA Server, verás (además de que la sincronización funciona ;) que el log del dispositivo muestra la siguiente respuesta del servidor

=-=- [24/07/2008 09:56:0255.000] -=-=
=-=-=-= Client Request =-=-=-=
OPTIONS Microsoft-Server-ActiveSync?User=usuario1&DeviceId=BAD73E6E02156460E800185977C03182&DeviceType=PocketPC
User-Agent: MSFT-PPC/5.2.1000

-=-=-=- Start of Body -=-=-=-

=-=- [24/07/2008 09:56:0257.000] -=-=
=-=-=-= Server Response =-=-=-
HTTP/1.1 200 OK
Content-Length: 0
Date: Thu, 24 Jul 2008 14:43:19 GMT
Server: Microsoft-IIS/5.0
X-Powered-By: ASP.NET
Pragma: no-cache
Public: OPTIONS, POST
Allow: OPTIONS, POST
MS-Server-ActiveSync: 6.5.7638.1
MS-ASProtocolVersions: 1.0,2.0,2.1,2.5
MS-ASProtocolCommands: Sync,SendMail,SmartForward,SmartReply,GetAttachment,GetHierarchy,CreateCollection,DeleteCollection,MoveCollection,FolderSync,FolderCreate,FolderDelete,FolderUpdate,MoveItems,GetItemEstimate,MeetingResponse,ResolveRecipients,ValidateCert,Provision,Search,Notify,Ping

-=-=-=- Start of Body -=-=-=-

En el IIS log del servidor de Exchange (donde está publicado el directorio virtual Microsoft-Server-Activesync) verás la siguiente entrada antes inexistente:

2008-07-24 14:43:19 192.168.0.1 dominio\usuario1 10.10.0.4 80 OPTIONS /Microsoft-Server-ActiveSync User=usuario1&DeviceId=BAD73E6E02156460E800185977C03182&DeviceType=PocketPC&Log=VNATNASNC:0A0C0D0FS:0A0C0D0SP:0C0I0S0R0S0L0H 200 MSFT-PPC/5.2.1000

Espero que ayude!