I have been banging my head with an issue with ActiveSync not working properly.

Running the Exchange Remote Connectivity Analyzer I was constantly getting and error Where it failed to Sync folders due to a server closing the connection

FolderSync Failed: A connection was closed

Well as I always do, the first thing was to check IIS on the CAS.

So opening the Logs under Inetpub\logfiles\W3SVC1 I found this logged

2011-04-27 07:03:00 POST /Microsoft-Server-ActiveSync/default.eas Cmd=FolderSync&User=exch2010test&DeviceId=112284038&DeviceType=TestActiveSyncConnectivity 443 – Microsoft-Server-ActiveSync/12.0+(TestExchangeConnectivity.com) 401 2 5 0

Now notice the error code is a 401.2, so checking for the IIS7 http status codes here, I can tell that this an authentication problem due to server configuration.

So next from here, its 1- an authentication problem and 2- Server configuration

So checking on the ActiveSync virtual Directory I found only Basic enabled, and so was the result checking from Exchange shell I found that WindowsAuthentication was disabled.

so I went ahead on the virtual directory and enabled Windows Authentication, restarted IIS. and guess what ??

IT WORKED Open-mouthed smile

I would always recommend you check IIS when anything is related to a service provided through it.