Troubleshoot ActiveSync with Exchange Server

What does this guide do?

Resolves sync issues for your inbox, calendar and other items between Exchange Server mailboxes and devices.

Who is it for?

Administrators who help diagnose ActiveSync issues for their users.

How does it work?

We’ll begin by asking you the issue you are facing. Then we’ll take you through a series of troubleshooting steps that are specific to your situation.

Estimated time of completion:

60-90 minutes.

What is the issue you are facing?

Note: Please reference this article for a list of current known issues.

What is the issue you are facing?

Note: Please reference this article for a list of current known issues.

Conclusion

Congratulations, your ActiveSync issue is resolved.


Unknown Error

Sorry, we cannot resolve the issue by using this guide. For more help resolving this issue contact Microsoft Support. Please have all of the data collected from this troubleshooting available when you contact support.

Unknown Device Error

Sorry, we cannot resolve the issue by using this guide. Based on the results of these troubleshooting steps, it is recommended you contact the device vendor for further support. You can also contact Microsoft Support for more help resolving this issue.

Exchange Remote Connectivity Analyzer

Verify that Autodiscover is working for Microsoft Exchange ActiveSync. To do this, follow these steps:

  1. Browse to the Microsoft Remote Connectivity Analyzer site
  2. Select Exchange ActiveSync Autodiscover from the Microsoft Exchange ActiveSync Connectivity Tests and click Next
  3. Enter all the required fields and click Perform Test
    3616_image8
     

Did the Connectivity Test fail?

Analyze Exchange Remote Connectivity Analyzer Results

To resolve this issue, review the results of the test and address any found issues. To do this, follow these steps:

  1. Click Expand All
    3616_image9
     

  2. Locate the error within the results (should be near the end) and address the issue
    3616_image10
     

Was the issue resolved using the results of the Exchange Remote Connectivity Analyzer results?

User Principal Name Check

Most Exchange ActiveSync devices request the email address and password to setup the device. This combination only works when the user principal name value matches the email address for the user. Verify these two attributes have the same value. To do this, follow these steps:

  1. Open the Exchange Management Shell.
  2. Run the following cmdlet to retrieve the attribute values:
    Get-Mailbox user | fl UserPrincipalName,PrimarySmtpAddress
    3616_image11
     

Does the UserPrincipalName match the PrimarySmtpAddress for the user?

Domain Suffix Check

Verify that the appropriate domain suffix is available for the UserPrincipalName attribute. To do this, follow these steps:

  1. Open Active Directory Users and Computers
  2. Locate the user object and double-click to view the properties
  3. Go to the Account tab and click the drop-down list for the User logon name
    3616_image12
     

Is the SMTP address domain listed in drop-down?
Add UPN Suffix; Modify the User Principal Name

Add UPN Suffix

To resolve this issue you will need to add the primary SMTP address domain to the UPN suffix list. To do this, follow these steps:

  1. Open Active Directory Domains and Trusts
  2. Right-click on Active Directory Domains and Trusts and select Properties
  3. Enter the primary SMTP address domain and click Add and then click OK
    3616_image13
     

Modify the User Principal Name

To resolve this issue, modify the UserPrincipalName attribute for the user. To do this, follow these steps:

  1. Open the Exchange Management Shell
  2. Run the following cmdlet to modify the UserPrincipalName:
    Set-Mailbox user –UserPrincipalName user@fabrikam.com

Did modifying the UserPrincipalName resolve the issue?

Modify the User Principal Name

To resolve this issue, modify the UserPrincipalName attribute for the user. To do this, follow these steps:

  1. Open the Exchange Management Shell.
  2. Run the following cmdlet to modify the UserPrincipalName:
    Set-Mailbox user –UserPrincipalName user@fabrikam.com

Did modifying the UserPrincipalName resolve the issue?

Policy Error

Exchange ActiveSync includes the use of ActiveSync mailbox policies. The available device settings are dependent on each device and not all settings work with all devices. To determine if the ActiveSync mailbox policy is an issue, create a new ActiveSync mailbox policy and assign it to the user. To do this, follow these steps:

  1. Open the Exchange Management Shell.
  2. Run the following cmdlet to create a new ActiveSync mailbox policy:
    New-ActiveSyncMailboxPolicy -Name "Test ActiveSync Policy"
  3. Run the following cmdlet to assign this new policy to the mailbox:
    Set-CASMailbox user -ActiveSyncMailboxPolicy "Test ActiveSync Policy"

Did creating a new ActiveSync mailbox policy resolve the issue?

Determine Impact

You must identify the impact in your environment before you begin to troubleshoot this issue.


How many users are unable to connect to Exchange ActiveSync?

Check Active Directory Permissions

Verify the user object permissions are not preventing connectivity issues. To do this, follow these steps:

  1. Open Active Directory Users and Computers
  2. Go to the View menu and select Advanced Features
  3. Locate the user object and double-click to view the properties
  4. Go to the Security tab and click the Advanced button
    3616_image14
     

Is the Include inheritable permissions from this object’s parent enabled?

Update Active Directory Permissions

To resolve this issue, modify the user object permissions to inherit permissions from the object’s parent. To do this, follow these steps:

  1. Open Active Directory Users and Computers
  2. Go to the View menu and select Advanced Features
  3. Locate the user object and double-click to view the properties
  4. Go to the Security tab and click the Advanced button
  5. Enable the Include inheritable permissions from this object’s parent and click OK twice
    3616_image15
     

Did modifying the user object’s permissions resolve the issue?

Enable ActiveSync Mailbox Logging; Capture Fiddler Trace; Analyze ActiveSync Mailbox Log

Enable ActiveSync Mailbox Logging

You need to enable ActiveSync mailbox logging on the Client Access Server and the mailbox to collect more detailed logging. Additional information on mailbox logging can be found here. To do this, follow these steps:

Note: This change should be made on Exchange 2013 mailbox servers.

  1. Open Windows Explorer and browse to the Sync folder (C:\Program Files\Microsoft\Exchange Server\V14\ClientAccess\Sync).
  2. Make a copy of the web.config file.
  3. Open the web.config file in Notepad and modify the following sections with the values below:
    3616_image16
     

  4. Open IIS Manager.
  5. Expand the server and select Application Pools.
  6. Right-click on the MSExchangeSyncAppPool and select Stop.
  7. Right-click on the MSExchangeSyncAppPool and select Start.
  8. Open the Exchange Management Shell.
  9. Run the following cmdlet to enable the mailbox logging for a user:
    Set-CASMailbox user -ActiveSyncDebugLogging:$True

Capture Fiddler Trace

ActiveSync device requests do not always reach the destination as desired. To ensure the device request and response is being sent and received as expected, route the device thru an HTTP proxy and review the data. To do this, follow these steps:
  1. Download and install Fiddler onto a workstation.
  2. Download EAS Inspector for Fiddler.
  3. Extract EASInspectorFiddler.dll into the c:\Program Files\Fiddler2\Inspectors folder.
  4. Launch the Fiddler application.
  5. Select the Tools menu and select Fiddler Options.
  6. Go to the HTTPS tab and select Decrypt HTTPS traffic, click Yes to all prompts.
  7. Go to the Connections tab and select Allow remote computers to connect, click OK to any prompt.
  8. Click OK and close the Fiddler application.
  9. Configure the ActiveSync device to use this workstation as a proxy server(This is typically done under the WiFi settings for the device).
  10. Launch the Fiddler application.
  11. Attempt to send one or more messages from the ActiveSync client.
  12. Select the File menu and select Capture Traffic to stop the trace.

Analyze ActiveSync Mailbox Log

We now have the data collected and we are ready to begin troubleshooting. The first step we will take is to look at the mailbox log and check if the item was captured. To do this, follow these steps:
  1. Open the Exchange Management Shell.
  2. Run the following cmdlet to retrieve the mailbox log for a user:
    Get-ActiveSyncDeviceStatistics -Mailbox user -GetMailboxLog:$True -NotificationEmailAddresses admin@contoso.com
    Note: This will send the ActiveSync mailbox log to the specified email address for analysis. Additional information on mailbox logging can be found here.
  3. Download MailboxLogParser and extract the files.
  4. Launch the utility by opening MailboxLogParser.exe.
  5. Click Import Mailbox Logs to Grid to open the mailbox log.
  6. Enter SendMail under Search raw log data for strings and click Search.
    3616_image18
     

Do you see the SendMail command in the log?
Placeholder_Merged to 15
Placeholder_Merged to 15
SendMail Status Code Check

The following is an example search result from an ActiveSync mailbox log:

3616_image19
 


What status code value do you see for the SendMail command in your log?

Exchange ActiveSync Organization Settings

Note: This feature is not available in Exchange 2007. If your organization is running Exchange 2007, click "I'm running Exchange 2007" at the end of the page.
The Exchange ActiveSync organization settings allow administrators the ability to set the default access level for ActiveSync devices. These default settings include Block, Quarantine, and Allow. Check the current organization settings to determine the current default access level in the environment. To do this, follow these steps:
  1. Open the Exchange Management Shell
  2. Run the following cmdlet to determine the current organization settings:
    Get-ActiveSyncOrganizationSettings | ft DefaultAccessLevel
    3616_image20
     

Is the default access level set to Allow?

Modify Exchange ActiveSync Organization Settings

To resolve this issue, modify the ActiveSync organization settings. To do this, follow these steps:

  1. Open the Exchange Management Shell
  2. Run the following cmdlet to determine the current organization settings:
    Set-ActiveSyncOrganizationSettings –DefaultAccessLevel Allow

Did changing the DefaultAccessLevel setting for the ActiveSync organization settings resolve the issue?

Exchange ActiveSync Device Access Rules

The Exchange ActiveSync device access rules allow an administrator to create access groups based on device characteristics. Check the current configuration for any device access rules that would allow the device to connect. To do this, follow these steps:

  1. Open the Exchange Management Shell
  2. Run the following cmdlet to find any device access rules with the access level set to Allow:
    Get-ActiveSyncDeviceAccessRule | Where { $_.AccessLevel -eq "Allow" }
    3616_image21
     

Are there any device access rules that match the user’s device with the access level set to Block or Quarantine?

Modify ActiveSync Device Access Rules

There are two ways to resolve this issue. The first method is to remove the device access rule. For more information on adding/removing device access rules click here. To do this, follow these steps:

  1. Open the Exchange Management Shell
  2. Run the following cmdlet to create a device access rule:
    Remove-ActiveSyncDeviceAccessRule ‘WindowsMail (DeviceType)’
    3616_image22
     

The second way is to modify the AccessLevel for the existing device access rule. To do this, follow these steps:

  1. Open the Exchange Management Shell
  2. Run the following cmdlet to modify the access level:
    Set-ActiveSyncDeviceAccessRule ‘WindowsMail (DeviceType)’ -AccessLevel Allow
    3616_image23
     

Did updating the device access rules in your organization resolve the issue?

Mailbox Blocked Device ID

An administrator can configure a list of devices that are not allowed to synchronize with the mailbox. Check the user configuration to determine if the device has been blocked from synchronizing. To do this, follow these steps:

  1. Open the Exchange Management Shell
  2. Run the following cmdlet to find any devices that are not allowed to synchronize:
    Get-CASMailbox user | fl ActiveSyncBlockedDeviceIDs
    3616_image24
     

Is the user’s device blocked from synchronizing with the user’s mailbox?

Modify Mailbox Settings

To resolve this issue, remove the device ID from the block list for the mailbox. To do this, follow these steps:

  1. Open the Exchange Management Shell
  2. Run the following cmdlet to find any devices that are not allowed to synchronize:
    Set-CASMailbox user -ActiveSyncBlockedDeviceIDs $null
    Note: Click here to see additional information on this cmdlet and available options.

Did removing this device ID from the block list for the mailbox resolve the issue?

Fiddler Trace Analysis

You attempted to send a message from the device so you should see the request in the Fiddler trace. You can use the Fiddler trace to see the request sent by the client and the response from the server. To do this, follow these steps:

  1. Open the Fiddler trace
  2. Go to the Edit menu and select Find Sessions
  3. Enter ActiveSync and click Find Sessions
  4. Review the Result column for any HTTP response values that do not equal 200
  5. Select requests where the Body column has a value
    3616_image25
     

  6. Select the TextView tab to view the response for additional details
    3616_image26
     

Were there any HTTP errors found in the Fiddler trace?

SendMail Status Code Check

You did not find any HTTP errors, so you should find a status code for the ActiveSync response. You can use the Fiddler trace locate these responses. To do this, follow these steps:

  1. Open the Fiddler trace
  2. Go to the Edit menu and select Find Sessions
  3. Enter ActiveSync and click Find Sessions
  4. Review the Body column and look for small values
    3616_image27
     

  5. View the EAS XML tabs for the request from the device and response received
    3616_image28
     

What status code do you see in the response window?

Install Log Parser Studio; Log Parser Studio Query – SendMail; Query Results Analysis

Install Log Parser Studio

The ActiveSync client may have encountered errors while attempting to communicate with the Exchange server. Now we need to determine where these errors originated. We will start by checking the IIS logs on the Client Access Server. Before these logs can be analyzed, the workstation where the analysis will be completed should have Log Parser Studio installed. To do this, follow these steps:

  1. Download and install LogParser
    • Double-click the LogParser.msi to begin the installation
    • Click Run if the Open File – Security Warning is displayed
    • On the Welcome screen, click Next
    • On the End-User license agreement screen, review and accept the license agreement, and click Next
    • On the Choose Setup Type screen, click Complete
    • On the Ready to Install screen, click Install
    • On the Completion screen, click Finish
  2. Download Log Parser Studio and extract the files

Once LogParser is installed and Log Parser Studio has been extracted, copy the IIS logs from the Exchange server(s) to the local workstation for analysis.

Log Parser Studio Query – SendMail

To determine if any of these ActiveSync requests are resulting in an error, query the IIS logs for the device traffic. To do this, follow these steps:

  1. Launch Log Parser Studio by double-clicking LPS.exe
  2. Click the Log folder icon to select files to process
    3616_image30
     

  3. Click the Add Files or Add Folder button, then locate and select the file(s) copied earlier
    3616_image31
     

  4. Verify the file/folder is selected and click OK
  5. Double-click ActiveSync: SendMail from the Library
  6. Click the exclamation point icon to execute the query
    3616_image32
     

  7. Analyze the results for this query by reviewing the Status, Error, ABQ, and sc-status columns.

Query Results Analysis

The following example shows the results from the previous query:

3616_image33
 

You need to review the results from your query for any issues. To do this, follow these steps:

  1. Review the Status column and locate any request where there is a value. Use the Exchange ActiveSync protocol document to investigate these values and if any corrective action can be taken.
  2. Review the Error column and locate any request where there is a value in this column. Many of these error messages are self-explanatory and corrective action can be taken accordingly.
  3. Review the sc-status column and locate any request where there is a value other than 200. This is the HTTP status response from IIS and additional information can be found here.

Were you able to resolve the issue after analyzing the IIS logs?

Placeholder_Merged into 27
Placeholder_Merged into 27
Exchange Remote Connectivity Analyzer

To determine if the user can successfully connect to Exchange, run the Exchange Remote Connectivity Analyzer with the user account. To do this, follow these steps:

  1. Browse to the Microsoft Remote Connectivity Analyzer site
  2. Select Exchange ActiveSync from the Microsoft Exchange ActiveSync Connectivity Tests and click Next
  3. Enter all the required fields and click Perform Test
    3616_image34
     

    Note: If needed, manually specify the server settings to bypass the Autodiscover user settings request.

Did the Exchange Remote Connectivity Analyzer test fail?

Analyze Exchange Remote Connectivity Analyzer Results

To resolve this issue, review the results of the test and address any found issues. To do this, follow these steps:

  1. Click Expand All
    3616_image9
     

  2. Locate the error within the results (should be near the end) and address the issue
    3616_image35
     

Was the issue resolved using the results of the Exchange Remote Connectivity Analyzer results?

Exchange ActiveSync Application Pool

Verify that the MSExchangeSyncAppPool is started and that it is running under the LocalSystem. To do this, follow these steps:

  1. Open IIS Manager
  2. Expand the server and select Application Pools
    
    3616_image36
     

Is the MSExchangeSyncAppPool started using the LocalSystem account?

Modify MSExchangeSyncAppPool

To resolve this issue, modify the MSExchangeSyncAppPool to use the LocalSystem account. To do this, follow these steps:

  1. Open IIS Manager
  2. Expand the server and select Application Pools
  3. Right-click on the MSExchangeSyncAppPool and select Advanced Settings
  4. Modify the Identity value by select LocalSystem
    
    3616_image37
     

  5. Right-click on the MSExchangeSyncAppPool and select Stop
  6. Right-click on the MSExchangeSyncAppPool and select Start

Did updating the MSExchangeSyncAppPool resolve the issue?

ActiveSync Virtual Directory Authentication Settings

Verify the authentication settings on the ActiveSync virtual directory. To do this, follow these steps:

  1. Open the Exchange Management Shell
  2. Run the following cmdlet to check the virtual directory settings:
    Get-ActiveSyncVirtualDirectory | ft server,basic*

Is the ActiveSync virtual directory configured to use Basic authentication?

Modify ActiveSync Virtual Directory Authentication Settings

To resolve this issue, configure the ActiveSync virtual directory to use basic authentication. To do this, follow these steps:

  1. Open the Exchange Management Shell
  2. Run the following cmdlet to enable basic authentication on the virtual directory:
    Set-ActiveSyncVirtualDirectory ServerName\Microsoft* -BasicAuthEnabled:$True

Did enabling basic authentication for the ActiveSync virtual directory resolve the issue?

ActiveSync Default Domain

Some devices send only the username value for the credentials which will cause an authentication failure. Verify that the default domain value is configured on the ActiveSync virtual directory. To do this, follow these steps:

  1. Open IIS Manager
  2. Expand the server, expand Sites, expand the Default Web Site, and select Microsoft-Server-ActiveSync
  3. In Features View, double-click Authentication
  4. Select Basic authentication, and click Edit in the Actions pane
    3616_image38
     

Is there a value present in the Default domain field?

Add Default Domain for ActiveSync Virtual Directory

To resolve this issue, configure a default domain for the ActiveSync virtual directory. To do this, follow these steps:

  1. Open IIS Manager
  2. Expand the server, expand Sites, expand the Default Web Site, and select Microsoft-Server-ActiveSync
  3. In Features View, double-click Authentication
  4. Select Basic authentication, and click Edit in the Actions pane
  5. Enter a value for the Default domain and click OK
    3616_image39
     

Did enabling a default domain for the ActiveSync virtual directory resolve the issue?

ActiveSync Virtual Directory SSL Settings

Verify that the ActiveSync virtual directory is not configured to require client certificates. To do this, follow these steps:

  1. Open IIS Manager
  2. Expand the server, expand Sites, expand the Default Web Site, and select Microsoft-Server-ActiveSync
  3. In Features View, double-click SSL Settings
    3616_image40
     

Is the SSL Setting for Client certificates set to Ignore?

Modify ActiveSync Virtual Directory SSL Settings

To resolve this issue, set the client certificates setting to Ignore. To do this, follow these steps:

  1. Open IIS Manager
  2. Expand the server, expand Sites, expand the Default Web Site, and select Microsoft-Server-ActiveSync
  3. In Features View, double-click SSL Settings
  4. Under Client certificates, select Ignore
    3616_image41
     

Did changing the SSL setting for Client certificates to Ignore resolve the issue?

ActiveSync Virtual Directory HTTP Redirect

When an HTTP redirect is configured in IIS 7, the redirect setting is inherited by all virtual directories underneath that web site. Check the ActiveSync virtual directory for an HTTP redirect. To do this, follow these steps:

  1. Open IIS Manager
  2. Expand the server, expand Sites, expand the Default Web Site, and select Microsoft-Server-ActiveSync
  3. In Features View, double-click HTTP Redirect
    3616_image42
     

Is a redirect configured for the ActiveSync virtual directory?

Modify ActiveSync Virtual Directory HTTP Redirect

To resolve this issue, remove the HTTP redirect from the ActiveSync virtual directory. To do this, follow these steps:

  1. Open IIS Manager
  2. Expand the server, expand Sites, expand the Default Web Site, and select Microsoft-Server-ActiveSync
  3. In Features View, double-click HTTP Redirect
  4. Clear the check box for Redirect requests to this destination
    
    3616_image43
     

Did removing the HTTP redirect from the ActiveSync virtual directory resolve the issue?

ActiveSync Enabled Mailbox

Verify the mailbox is enabled for ActiveSync. To do this, follow these steps:

  1. Open the Exchange Management Shell
  2. Run the following cmdlet to check the mailbox settings:
     Get-CASMailbox user | fl ActiveSyncEnabled
    3616_image44
     

Is the user enabled for ActiveSync?

Enable User for ActiveSync

To resolve this issue, enable the user for ActiveSync. To do this, follow these steps:

  1. Open the Exchange Management Shell
  2. Run the following cmdlet to enable the mailbox for ActiveSync:
    Set-CASMailbox user –ActiveSyncEnabled:$True
    3616_image45
     

Did enabling the mailbox for ActiveSync resolve the issue?

Exchange ActiveSync Protocol Document Review

Your SendMail command received an unexpected status code response from Exchange. To understand what error was encountered, you must review the Exchange ActiveSync Command Reference Protocol document to troubleshoot the issue.


Were you able to resolve the issue by reviewing the status code in the response?

Exchange ActiveSync Organization Settings

Note: This feature is not available in Exchange 2007. If your organization is running Exchange 2007, click "I'm running Exchange 2007" at the end of the page.

The Exchange ActiveSync organization settings allow administrators the ability to set the default access level for ActiveSync devices. These default settings include Block, Quarantine, and Allow. Check the current organization settings to determine the current default access level in the environment. To do this, follow these steps:

  1. Open the Exchange Management Shell
  2. Run the following cmdlet to determine the current organization settings:
    Get-ActiveSyncOrganizationSettings | ft DefaultAccessLevel
    3616_image20
     

Is the default access level set to Allow?

Modify ActiveSync Organization Settings

To resolve this issue, modify the ActiveSync organization settings. To do this, follow these steps:

  1. Open the Exchange Management Shell
  2. Run the following cmdlet to determine the current organization settings:
    Set-ActiveSyncOrganizationSettings –DefaultAccessLevel Allow

Did changing the DefaultAccessLevel setting for the ActiveSync organization settings resolve the issue?

Exchange ActiveSync Device Access Rules

The Exchange ActiveSync device access rules allow an administrator to create access groups based on device characteristics. Check the current configuration for any device access rules that would allow the device to connect. To do this, follow these steps:

  1. Open the Exchange Management Shell
  2. Run the following cmdlet to find any device access rules with the access level set to Allow:
    Get-ActiveSyncDeviceAccessRule | Where { $_.AccessLevel -eq "Allow" }
    3616_image21
     

Are there any device access rules that match the user’s device with the access level set to Block or Quarantine?

Modify ActiveSync Device Access Rules

The Exchange ActiveSync device access rules allow an administrator to create access groups based on device characteristics. Check the current configuration for any device access rules that would allow the device to connect. To do this, follow these steps:

  1. Open the Exchange Management Shell
  2. Run the following cmdlet to find any device access rules with the access level set to Allow:
    Get-ActiveSyncDeviceAccessRule | Where { $_.AccessLevel -eq "Allow" }
    3616_image21
     

Are there any device access rules that match the user’s device with the access level set to Block or Quarantine?

Mailbox Blocked Device ID

An administrator can configure a list of devices that are not allowed to synchronize with the mailbox. Check the user configuration to determine if the device has been blocked from synchronizing. To do this, follow these steps:

  1. Open the Exchange Management Shell
  2. Run the following cmdlet to find any devices that are not allowed to synchronize:
    Get-CASMailbox user | fl ActiveSyncBlockedDeviceIDs
    3616_image24
     

Is the user’s device blocked from synchronizing with the user’s mailbox?

Modify Mailbox Settings

To resolve this issue, remove the device ID from the block list for the mailbox. To do this, follow these steps:

  1. Open the Exchange Management Shell
  2. Run the following cmdlet to find any devices that are not allowed to synchronize:
    Set-CASMailbox user -ActiveSyncBlockedDeviceIDs $null
    Note: Click here to see additional information on this cmdlet and available options.

Did removing this device ID from the block list for the mailbox resolve the issue?

Install Log Parser Studio; Log Parser Studio Query – Count Syncs with SyncKey of Zero Per User

Install Log Parser Studio

The ActiveSync client may have encountered errors while attempting to communicate with the Exchange server. Now we need to determine where these errors originated. We will start by checking the IIS logs on the Client Access Server. Before these logs can be analyzed, the workstation where the analysis will be completed should have Log Parser Studio installed. To do this, follow these steps:

  1. Download and install LogParser
    • Double-click the LogParser.msi to begin the installation
    • Click Run if the Open File – Security Warning is displayed
    • On the Welcome screen, click Next
    • On the End-User license agreement screen, review and accept the license agreement, and click Next
    • On the Choose Setup Type screen, click Complete
    • On the Ready to Install screen, click Install
    • On the Completion screen, click Finish
  2. Download Log Parser Studio and extract the files

Once LogParser is installed and Log Parser Studio has been extracted, copy the IIS logs from the Exchange server(s) to the local workstation for analysis.


Log Parser Studio Query – Count Syncs with SyncKey of Zero Per User

To determine if devices are re-synchronizing with Exchange, run the Log Parser query to find the users. To do this, follow these steps:

  1. Launch Log Parser Studio by double-clicking LPS.exe
  2. Click the Log folder icon to select files to process
    3616_image30
     

  3. Click the Add Files or Add Folder button, then locate and select the file(s) copied earlier
    3616_image31
     

  4. Verify the file/folder is selected and click OK
  5. Double-click ActiveSync: Count Syncs with SyncKey of Zero Per User from the Library
  6. Click the exclamation point icon to execute the query
    3616_image32
     

  7. Analyze the results for this query
    3616_image75
     

Are there any devices with multiple requests using the SyncKey value of 0?

Check for File Level Anti-Virus

In many cases file-level anti-virus impacts ActiveSync traffic by delaying the processing of the request or response. Stopping these services does not disable the kernel mode filter driver used by these services. To disable file level anti-virus follow the steps from this article. Verify the kernel mode filter driver is no longer active after the Client Access Server has been restarted. To do this, follow these steps:

  1. Open a command prompt
  2. Run the following command:
    fltmc
  3. Compare the results to the example filter drivers from this article or search the web for the Filter Name
    3616_image46
     

Did disabling the anti-virus kernel mode filter driver resolve the issue?

Mail Issues

Select the type of mail issue that the ActiveSync client is experiencing.

Items Present on Only One Client

The reported issue is a message that appears in the mailbox within Outlook but not on the ActiveSync client or vice versa. Before we begin troubleshooting this issue, we need to know if the issue can be reproduced on the ActiveSync client. If we can reproduce the issue, then we can capture data during the process to get a better understanding of the issue. Otherwise we will need to examine existing logs to attempt to determine what happened.


Can you reproduce the Calendar issue on the device?

Enable ActiveSync Mailbox Logging; Capture Fiddler Trace; Locate Item Using MfcMapi; Search for Item in Mailbox Log;

Enable ActiveSync Mailbox Logging

The first troubleshooting step is enabling mailbox logging on the Client Access Server and the mailbox. Additional information on mailbox logging can be found here. To do this, follow these steps:

Note: This change should be made on Exchange 2013 mailbox servers.

  1. Open Windows Explorer and browse to the Sync folder (C:\Program Files\Microsoft\Exchange Server\V14\ClientAccess\Sync)
  2. Make a copy of the web.config file
  3. Open the web.config file in Notepad and modify the following sections with the values below:
    3616_image16
     

  4. Open IIS Manager
  5. Expand the server and select Application Pools
  6. Right-click on the MSExchangeSyncAppPool and select Stop
  7. Right-click on the MSExchangeSyncAppPool and select Start
  8. Open the Exchange Management Shell
  9. Run the following cmdlet to enable the mailbox logging for a user:
    Set-CASMailbox user -ActiveSyncDebugLogging:$True 

Capture Fiddler Trace

ActiveSync device requests do not always reach the destination as desired. To ensure the device request and response is being sent and received as expected, route the device thru an HTTP proxy and review the data. To do this, follow these steps:
  1. Download and install Fiddler onto a workstation
  2. Download EAS Inspector for Fiddler
  3. Extract EASInspectorFiddler.dll into the c:\Program Files\Fiddler2\Inspectors folder
  4. Launch the Fiddler application
  5. Select the Tools menu and select Fiddler Options
  6. Go to the HTTPS tab and select Decrypt HTTPS traffic, click Yes to all prompts
  7. Go to the Connections tab and select Allow remote computers to connect, click OK to any prompt
  8. Click OK and close the Fiddler application
  9. Configure the ActiveSync device to use this workstation as a proxy server(This is typically done under the WiFi settings for the device)
  10. Launch the Fiddler application
  11. Attempt to send one or more messages from the ActiveSync client
  12. Select the File menu and select Capture Traffic to stop the trace

Locate Item Using MfcMapi

We need to determine the ConversationID for the item before we search the mailbox log. To do this, follow these steps:

  1. Download and install MfcMapi
  2. Launch MfcMapi
  3. Go to the Session menu and select Logon
  4. Select the Outlook profile for the mailbox and click OK
  5. Double-click the mailbox to open
  6. Expand the Root Container, expand Top of Information Store, then right-click on the Inbox (or other folder where the item is located) and select Open contents table
    3616_image47
     

  7. Select the item within the table, right-click on the tag 0x00710102 and select Edit property
    3616_image48
     

  8. Copy the Binary value
    3616_image49
     

Search for Item in Mailbox Log

We now have the data collected and we are ready to begin troubleshooting. The first step we will take is to look at the mailbox log and check if the item was captured. To do this, follow these steps:

  1. Open the Exchange Management Shell
  2. Run the following cmdlet to retrieve the mailbox log for a user:
    Get-ActiveSyncDeviceStatistics -Mailbox user -GetMailboxLog:$True -NotificationEmailAddresses admin@contoso.com

    Note: This will send the ActiveSync mailbox log to the specified email address for analysis. Additional information on mailbox logging can be found here.
  3. Download MailboxLogParser and extract the files
  4. Launch the utility by opening MailboxLogParser.exe
  5. Click Import Mailbox Logs to Grid to open the mailbox log
    3616_image50
     

Search for Item in Mailbox Log

  1. Remove the first byte (or two characters) from the binary value copied earlier. Then use the next five bytes (or ten characters) for your search value.
    Example: 01CEC1E829ED44997723AC344564BBEEF22D3A1A3373
  2. Enter the value from Step 1 in Search raw log data for strings and click Search
    3616_image91
     

  3. Take the next 16 bytes (or 32 characters) from the binary value and compare the value with the ConversationId in the search results.
    Example: 01CEC1E829ED44997723AC344564BBEEF22D3A1A3373
    3616_image92
     

  4. Make note of the ServerId value for the item. The value for the example above is 5:11.

Were you able to locate the item in the mailbox log using the ConversationId?

Placeholder_Merged into 55
Placeholder_Merged into 55
Placeholder_Merged into 55
Analyze Mailbox Log for Item; Check the Final Status of the Item

Analyze Mailbox Log for Item

Now that we know we have the item in our mailbox log, we need to track the actions taken against the appointment. To do this, follow these steps:

  1. Search for the ServerId value found earlier
    3616_image93
     

  2. Scroll up the log and look for either RequestBody or ResponseBody. If the item appears in the response body, then the item was updated from the server. Otherwise the item appears in the request body which means the item was updated from the client.
    3616_image60
     

  3. Make note of the action (Add, Change, or Delete) and whether the server or client sent the action
  4. Repeat Steps 2-4 until you cannot find any further entries.

Note: Click here for additional information on Exchange ActiveSync mailbox logging analysis.

Check the Final Status of the Item

We verified that one or more actions were taken against the item within the mailbox log. The end result of the item is dependent on the final action. The following describes the expected status of the item based on that action:

Add – The item should be in the folder on the ActiveSync client

Change – The item should be updated in the folder on the ActiveSync client

Delete – The item should be removed from the folder on the ActiveSync client


Does the result of the final action meet the expected state of the item?

Placeholder_Merged into 59

We verified that one or more actions were taken against the item within the mailbox log. The end result of the item is dependent on the final action. The following describes the expected status of the item based on that action:

Add – The item should be in the folder on the ActiveSync client

Change – The item should be updated in the folder on the ActiveSync client

Delete – The item should be removed from the folder on the ActiveSync client

Does the result of the final action meet the expected state of the item?

Fiddler Trace Analysis for Item; Check the Final Status of the Item

Fiddler Trace Analysis for Item

The activity on the Exchange server indicates that the device should have the correct status for this appointment. We can use the Fiddler trace to verify that the response was received by the client. To do this, follow these steps:

  1. Open the Fiddler trace
  2. Go to the Edit menu and select Find Sessions
  3. Enter the namespace for ActiveSync (Example: mail.contoso.com) and click Find Sessions
  4. Select requests where the Body column has a value
    3616_image61
     

  5. Select the EAS XML tabs to view the request and response
    3616_image62
     

  6. Locate all requests and responses for the ServerId found earlier

Check the Final Status of the Item

We verified that one or more actions were taken against the item within the Fiddler trace. The end result of the item is dependent on the final action. The following describes the expected status of the item based on that action:

Add – The item should be in the folder on the ActiveSync client

Change – The item should be updated in the folder on the ActiveSync client

Delete – The item should be removed from the folder on the ActiveSync client


Does the result of the final action meet the expected state of the item?

Placeholder_Merged into 61
Fiddler Trace Analysis for Errors

We expect the device to send one or more requests to obtain the latest updates for the folder. We can use the Fiddler trace to verify that the request was sent by the client and a response was received by the server. To do this, follow these steps:

  1. Open the Fiddler trace
  2. Go to the Edit menu and select Find Sessions
  3. Enter the namespace for ActiveSync (Example: mail.contoso.com) and click Find Sessions
  4. Review the Result column for any HTTP response values that do not equal 200
  5. Select requests where the Body column has a value
    3616_image25
     

  6. Select the TextView tab to view the response for additional details
    3616_image26
     

Were there any errors found in the Fiddler trace?

Install Log Parser Studio; Log Parser Studio Query – Device Query; Query Results Analysis; Re-Sync the Folder

Install Log Parser Studio

The ActiveSync client may have encountered errors while attempting to communicate with the Exchange server. Now we need to determine where these errors originated. We will start by checking the IIS logs on the Client Access Server. Before these logs can be analyzed, the workstation where the analysis will be completed should have Log Parser Studio installed. To do this, follow these steps:

  1. Download and install LogParser
    • Double-click the LogParser.msi to begin the installation
    • Click Run if the Open File – Security Warning is displayed
    • On the Welcome screen, click Next
    • On the End-User license agreement screen, review and accept the license agreement, and click Next
    • On the Choose Setup Type screen, click Complete
    • On the Ready to Install screen, click Install
    • On the Completion screen, click Finish
  2. Download Log Parser Studio and extract the files

Once LogParser is installed and Log Parser Studio has been extracted, copy the IIS logs from the Exchange server(s) to the local workstation for analysis.

Log Parser Studio Query – Device Query

To determine if any of these ActiveSync requests are resulting in an error, query the IIS logs for the device traffic. To do this, follow these steps:

  1. Launch Log Parser Studio by double-clicking LPS.exe
  2. Click the Log folder icon to select files to process
    3616_image30
     

  3. Click the Add Files or Add Folder button, then locate and select the file(s) copied earlier
    3616_image31
     

  4. Verify the file/folder is selected and click OK
  5. Double-click ActiveSync: Device query from the Library
  6. Modify the DeviceId value in the WHERE clause at the end of the query with the value from the previous step.
  7. Click the exclamation point icon to execute the query
    3616_image32
     

  8. Analyze the results for this query by reviewing the Error and sc-status columns.
    3616_image54
     

Query Results Analysis

Now we want to review the results of the previous query for any errors. To do this, follow these steps:

  1. Review the Status column and locate any request where this value is greater than 1. Use the Exchange ActiveSync protocol document to investigate these values and if any corrective action can be taken. (You can ignore Ping commands from this review)
  2. Review the Error column and locate any request where there is a value in this column. Many of these error messages are self-explanatory and corrective action can be taken accordingly.
  3. Review the sc-status column and locate any request where there is a value other than 200. This is the HTTP status response from IIS and additional information can be found here.

Unfortunately the review of the IIS logs does not show us any identifier for the item in question. Your best effort will be locating a request within the IIS logs around the time the last item change occurred.

Note: You can also use this article to help you better understand some of the elements found with the IIS log entry.

Re-Sync the Folder

The previous steps taken help to identify why the issue occurred with the item. The ActiveSync client may still not have the item in the correct state. To resolve this issue, remove the folder from the list of folders to synchronize, wait approximately five minutes, and then add the folder to the list of folders to synchronize.


Is the item in the correct state on the ActiveSync client?

Placeholder_Merged into 64
Placeholder_Merged into 64
Mailbox Log Analysis for Errors

The ActiveSync traffic for this item does not result in the item being in the correct state on the device. Now we need to review the mailbox log further for issues with ActiveSync requests for the folder. To do this, follow these steps:

  1. Review the search results from the previous step
  2. Check the Status code value in the response and if the value does not equal 1, review the ActiveSync protocol document for more information on the status code.
  3. Also check the log entry for any exception messages.
  4. Repeat Steps 2-4 for each log entry for the Calendar

Note: Click here for additional information on Exchange ActiveSync mailbox logging analysis.


Were there any Status codes that did not equal 1 in the response or any exceptions found in the mailbox log?

Install Log Parser Studio; Log Parser Studio Query – DeviceId Query; Query Results Analysis; Re-Sync the Folder

Install Log Parser Studio

The ActiveSync client may have encountered errors while attempting to communicate with the Exchange server. Now we need to determine where these errors originated. We will start by checking the IIS logs on the Client Access Server. Before these logs can be analyzed, the workstation where the analysis will be completed should have Log Parser Studio installed. To do this, follow these steps:

  1. Download and install LogParser
    • Double-click the LogParser.msi to begin the installation
    • Click Run if the Open File – Security Warning is displayed
    • On the Welcome screen, click Next
    • On the End-User license agreement screen, review and accept the license agreement, and click Next
    • On the Choose Setup Type screen, click Complete
    • On the Ready to Install screen, click Install
    • On the Completion screen, click Finish
  2. Download Log Parser Studio and extract the files

Once LogParser is installed and Log Parser Studio has been extracted, copy the IIS logs from the Exchange server(s) to the local workstation for analysis.

Log Parser Studio Query – DeviceId Query

To determine if any of these ActiveSync requests are resulting in an error, query the IIS logs for the device traffic. To do this, follow these steps:

  1. Open the Exchange Management Shell
  2. Run the following cmdlet to find any devices that are not allowed to synchronize:
    Get-ActiveSyncDevice -Mailbox | fl DeviceId,DeviceType
  3. Launch Log Parser Studio by double-clicking LPS.exe
  4. Click the Log folder icon to select files to process
    3616_image30
     

  5. Click the Add Files or Add Folder button, then locate and select the file(s) copied earlier
    3616_image31
     

  6. Verify the file/folder is selected and click OK
  7. Double-click ActiveSync: Device query from the Library
  8. Modify the DeviceId value in the WHERE clause at the end of the query with the value from step 2.
  9. Click the exclamation point icon to execute the query
    3616_image32
     

  10. Analyze the results for this query by reviewing the Error and sc-status columns.
    3616_image54
     

Query Results Analysis

Now we want to review the results from your query for any issues. To do this, follow these steps:

  1. Review the Status column and locate any request where there is a value is greater than 1. Use the Exchange ActiveSync protocol document to investigate these values and if any corrective action can be taken.(You can ignore Ping commands from this review)
  2. Review the Error column and locate any request where there is a value in this column. Many of these error messages are self-explanatory and corrective action can be taken accordingly.
  3. Review the sc-status column and locate any request where there is a value other than 200. This is the HTTP status response from IIS and additional information can be found here.

Unfortunately the review of the IIS logs does not show us any identifier for the item in question. Your best effort will be locating a request within the IIS logs around the time the last item change occurred. You can also use this article to help you better understand some of the elements found with the IIS log entry.

Re-Sync the Folder

The previous steps taken help to identify why the issue occurred with the item. The ActiveSync client may still not have the item in the correct state. To resolve this issue, remove the folder from the list of folders to synchronize, wait approximately five minutes, and then add the folder to the list of folders to synchronize.


Is the item in the correct state on the ActiveSync client?

Placeholder_Merged into 68
Placeholder_Merged into 68
Re-Sync the Folder

The previous steps taken help to identify why the issue occurred with the item. The ActiveSync client may still not have the item in the correct state. To resolve this issue, remove the folder from the list of folders to synchronize, wait approximately five minutes, and then add the folder to the list of folders to synchronize.


Is the item in the correct state on the ActiveSync client?

Install Log Parser Studio; Locate DeviceId for User; Log Parser Studio Query – Device query; Query Results Analysis

Install Log Parser Studio

The ActiveSync client may have encountered errors while attempting to communicate with the Exchange server. Now we need to determine where these errors originated. We will start by checking the IIS logs on the Client Access Server. Before these logs can be analyzed, the workstation where the analysis will be completed should have Log Parser Studio installed. To do this, follow these steps:

  1. Download and install LogParser
    • Double-click the LogParser.msi to begin the installation
    • Click Run if the Open File – Security Warning is displayed
    • On the Welcome screen, click Next
    • On the End-User license agreement screen, review and accept the license agreement, and click Next
    • On the Choose Setup Type screen, click Complete
    • On the Ready to Install screen, click Install
    • On the Completion screen, click Finish
  2. Download Log Parser Studio and extract the files

Once LogParser is installed and Log Parser Studio has been extracted, copy the IIS logs from the Exchange server(s) to the local workstation for analysis.

Locate DeviceId for User

We need to obtain the DeviceId for the ActiveSync client experiencing the issue. To do this, follow these steps:

  1. Open the Exchange Management Shell
  2. Run the following cmdlet to retrieve the DeviceId:
    Get-ActiveSyncDeviceStatistics -Mailbox clt | fl DeviceId,DeviceType
    3616_image55
     

  3. Make note of the DeviceID value

Log Parser Studio Query – Device query

To determine if any of these ActiveSync requests are resulting in an error, query the IIS logs for the device traffic. To do this, follow these steps:

  1. Launch Log Parser Studio by double-clicking LPS.exe
  2. Click the Log folder icon to select files to process
    3616_image30
     

  3. Click the Add Files or Add Folder button, then locate and select the file(s) copied earlier
    3616_image31
     

  4. Verify the file/folder is selected and click OK
  5. Double-click ActiveSync: Device query from the Library
  6. Modify the DeviceId value in the WHERE clause at the end of the query with the value from the previous step.
  7. Click the exclamation point icon to execute the query
    3616_image32
     

  8. Analyze the results for this query by reviewing the Error and sc-status columns.
    3616_image54
     

Query Results Analysis

Now we want to review the results of the previous query for any errors.


What error message did you find in the results from the query?

Placeholder_Merged into 72
Placeholder_Merged into 72
Placeholder_Merged into 72
Check ActiveSync Mailbox Policy

To determine if there is an ActiveSync mailbox policy setting causing the AttachmentTooBig error, check the ActiveSync mailbox policy assigned to this mailbox. To do this, follow these steps:

  1. Open the Exchange Management Shell
  2. Run the following cmdlet to retrieve the ActiveSync mailbox policy settings for this user:
    Get-ActiveSyncMailboxPolicy (Get-Mailbox alias ).ActiveSyncMailboxPolicy | ft name,*Attach* -AutoSize
    Note: This cmdlet should only return one result. If you receive more than one policy in the results, use the settings from the Default.
    3616_image57
     

Is the MaxAttachmentSize setting set to unlimited?

Check Message Size Limits

To determine if maximum message size restrictions may be causing the AttachmentTooBig error, check the transport settings for the Exchange organization. To do this, follow these steps:

  1. Open the Exchange Management Shell
  2. Run the following cmdlet to retrieve the message size limits:
    Get-TransportConfig | fl *size
    3616_image58
     

Is either the MaxReceiveSize or MaxSendSize limits greater than 10 MB?

Modify Exchange ActiveSync Settings

To resolve this issue, increase the maximum amount of data transfer for the ActiveSync virtual directory. To do this, follow these steps:

IMPORTANT: The following changes may result in increased data charges on mobile devices.

  1. Open Windows Explorer
  2. Browse to the Exchange Install Path (%ExchangeInstallPath%) then browse to the ClientAccess and Sync directories
  3. Make a copy of the web.config file
  4. Open the web.config file in Notepad
  5. Locate the MaxDocumentDataSIze and modify the value as needed
    3616_image60
     

    Note: This value is in bytes.
  6. Locate the MaxRequestLength and modify the value as needed
    3616_image61
     

    Note: This value is in kilobytes.
  7. Open IIS Manager
  8. Expand the server and select Application Pools
  9. Right-click on the MSExchangeSyncAppPool and select Stop
  10. Right-click on the MSExchangeSyncAppPool and select Start

Did modifying the ActiveSync setting resolve the issue?

Modify ActiveSync Mailbox Policy

To resolve this issue, increase the maximum attachment size limit in the ActiveSync mailbox policy. To do this, follow these steps:

  1. Open the Exchange Management Shell
  2. Run the following cmdlet to modify the ActiveSync mailbox policy:
    Set-ActiveSyncMailboxPolicy Default -MaxAttachmentSize 20971520
    Note: The MaxAttachmentSize value is in bytes. Modify the policy name and size in the cmdlet above to meet your needs.

Did increasing the maximum attachment size in the ActiveSync mailbox policy resolve the issue?

Enable ActiveSync Mailbox Logging; Analyze ActiveSync Mailbox Log; Locate Attachment Using MfcMapi

Enable ActiveSync Mailbox Logging

To determine the ActiveSync response which is causing the failure, mailbox logging must be enabled. Additional information on mailbox logging can be found here. To do this, follow these steps:

Note: This change should be made on Exchange 2013 mailbox servers.

  1. Open Windows Explorer and browse to the Sync folder (C:\Program Files\Microsoft\Exchange Server\V14\ClientAccess\Sync)
  2. Make a copy of the web.config file
  3. Open the web.config file in Notepad and modify the following sections with the values below:
    3616_image16
     

  4. Open IIS Manager
  5. Expand the server and select Application Pools
  6. Right-click on the MSExchangeSyncAppPool and select Advanced Settings
  7. Right-click on the MSExchangeSyncAppPool and select Stop
  8. Right-click on the MSExchangeSyncAppPool and select Start
  9. Open the Exchange Management Shell
  10. Run the following cmdlet to enable the mailbox logging for a user:
    Set-CASMailbox user -ActiveSyncDebugLogging:$True
  11. Attempt to open the attachment from the ActiveSync client

Analyze ActiveSync Mailbox Log

Review the mailbox log to determine that attachment the user is attempting to open. To do this, follow these steps:

  1. Open the Exchange Management Shell
  2. Run the following cmdlet to retrieve the mailbox log for a user:
    Get-ActiveSyncDeviceStatistics -Mailbox user -GetMailboxLog:$True -NotificationEmailAddresses admin@contoso.com
    Note: This will send the ActiveSync mailbox log to the specified email address for analysis. Additional information on mailbox logging can be found here.
  3. Download MailboxLogParser and extract the files
  4. Launch the utility by opening MailboxLogParser.exe
  5. Click Import Mailbox Logs to Grid to open the mailbox log
    3616_image50
     

  6. Enter ObjectNotFound under Search raw log data for strings and click Search
  7. Review the search results by finding the error in the log entry. Make note of the attachment number in the FileReference. This is the last number in the value: 5%3a12%3a0. (The full value is 5:12:0, which is attachment 0 for ServerId 5:12.)
    3616_image62
     

Note: Click here for additional information on Exchange ActiveSync mailbox logging analysis.


Locate Attachment Using MfcMapi

We need to determine if the attachment exists within the message. To do this, follow these steps:

  1. Download and install MfcMapi
  2. Launch MfcMapi
  3. Go to the Session menu and select Logon
  4. Select the Outlook profile for the mailbox and click OK
  5. Double-click the mailbox to open
  6. Expand the Root Container, expand Top of Information Store, then right-click on the Inbox (or other folder where the item is located) and select Open contents table
    3616_image47
     

  7. Right-click on the message and select Attachments > Display attachment table
  8. You should see a list of attachments within the message
    3616_image63
     

Do you see an attachment with the FileReference number found in the mailbox log?

Placeholder_Merged into 80
Placeholder_Merged into 80
View Attachment Using Outlook

To determine if the attachment is corrupt, ask the user to open the attachment in either Outlook or Outlook Web Access.


Is the user able to open the attachment from another client?

Check ActiveSync Mailbox Policy

To determine if there is an ActiveSync mailbox policy setting causing the AttachmentTooBig error, check the ActiveSync mailbox policy assigned to this mailbox. To do this, follow these steps:

  1. Open the Exchange Management Shell
  2. Run the following cmdlet to retrieve the ActiveSync mailbox policy settings for this user:
    Get-ActiveSyncMailboxPolicy (Get-Mailbox alias).ActiveSyncMailboxPolicy | ft name,*Attach* -AutoSize
    Note: This cmdlet should only return one result. If you receive more than one policy in the results, use the settings from the Default.
    3616_image57
     

Is the AttachmentsEnabled setting set to True?

Modify ActiveSync Mailbox Policy

To resolve this issue, increase the maximum attachment size limit in the ActiveSync mailbox policy. To do this, follow these steps:

  1. Open the Exchange Management Shell
  2. Run the following cmdlet to modify the ActiveSync mailbox policy:
    Set-ActiveSyncMailboxPolicy Default –AttachmentsEnabled:$True

Did increasing the maximum attachment size in the ActiveSync mailbox policy resolve the issue?

Unable to Send a Message

We are going to troubleshoot the issue where a user is unable to send a message from an ActiveSync client.


Can the user reproduce the issue?

Enable ActiveSync Mailbox Logging; Capture Fiddler Trace; Mailbox Log Analysis for Errors

Enable ActiveSync Mailbox Logging

The first step is to enable mailbox logging on the Client Access Server(s) and the user mailbox. Additional information on mailbox logging can be found here. To do this, follow these steps:

Note: This change should be made on Exchange 2013 mailbox servers.

  1. Open Windows Explorer and browse to the Sync folder (C:\Program Files\Microsoft\Exchange Server\V14\ClientAccess\Sync)
  2. Make a copy of the web.config file
  3. Open the web.config file in Notepad and modify the following sections with the values below:
    3616_image16
     

  4. Open IIS Manager
  5. Expand the server and select Application Pools
  6. Right-click on the MSExchangeSyncAppPool and select Stop
  7. Right-click on the MSExchangeSyncAppPool and select Start
  8. Open the Exchange Management Shell
  9. Run the following cmdlet to enable the mailbox logging for a user:
    Set-CASMailbox user -ActiveSyncDebugLogging:$True

Capture Fiddler Trace

ActiveSync device requests do not always reach the destination as desired. To ensure the device request and response is being sent and received as expected, route the device thru an HTTP proxy and review the data. To do this, follow these steps:

  1. Download and install Fiddler onto a workstation
  2. Download EAS Inspector for Fiddler
  3. Extract EASInspectorFiddler.dll into the c:\Program Files\Fiddler2\Inspectors folder
  4. Launch the Fiddler application
  5. Select the Tools menu and select Fiddler Options
  6. Go to the HTTPS tab and select Decrypt HTTPS traffic, click Yes to all prompts
  7. Go to the Connections tab and select Allow remote computers to connect, click OK to any prompt
  8. Click OK and close the Fiddler application
  9. Configure the ActiveSync device to use this workstation as a proxy server(This is typically done under the WiFi settings for the device)
  10. Launch the Fiddler application
  11. Reproduce the issue with the ActiveSync device
  12. Select the File menu and select Capture Traffic to stop the trace

Mailbox Log Analysis for Errors

The request from the ActiveSync client to send this message is not successful. We need to verify that the Exchange server received the request and determine if the server sent any response. To do this, follow these steps:

  1. Open the Exchange Management Shell
  2. Run the following cmdlet to retrieve the mailbox log for a user:
    Get-ActiveSyncDeviceStatistics -Mailbox user -GetMailboxLog:$True -NotificationEmailAddresses admin@contoso.com
    Note: This sends the ActiveSync mailbox log to the specified email address. Additional information on mailbox logging can be found here.
  3. Download MailboxLogParser and extract the files
  4. Launch the utility by opening MailboxLogParser.exe
  5. Click Import Mailbox Logs to Grid to open the mailbox log
  6. Enter SendMail under Search raw log data for strings and click Search
  7. Review the search results by checking the Satus column for any values

Note: Click here for additional information on Exchange ActiveSync mailbox logging analysis.


Were there any errors or exceptions found in the mailbox log?

Placeholder_Merged into 87
Placeholder_Merged into 87
Fiddler Trace Analysis for Errors

We expect the device to send a SendMail command to the Exchange server. We can use the Fiddler trace to verify that the request was sent by the client and a response was received by the server. To do this, follow these steps:

  1. Open the Fiddler trace
  2. Go to the Edit menu and select Find Sessions
  3. Enter the namespace for ActiveSync (Example: mail.contoso.com) and click Find Sessions
  4. Review the Result column for any HTTP response values that do not equal 200
  5. Select requests where the Body column has a value
    3616_image25
     

  6. Select the TextView tab to view the response for additional details
    3616_image26
     

Were there any errors found in the Fiddler trace?

Install Log Parser Studio; Log Parser Studio Query – SendMail; Query Results Analysis

Install Log Parser Studio

The ActiveSync client may have encountered errors while attempting to communicate with the Exchange server. Now we need to determine where these errors originated. We will start by checking the IIS logs on the Client Access Server. Before these logs can be analyzed, the workstation where the analysis will be completed should have Log Parser Studio installed. To do this, follow these steps:

  1. Download and install LogParser
    • Double-click the LogParser.msi to begin the installation
    • Click Run if the Open File – Security Warning is displayed
    • On the Welcome screen, click Next
    • On the End-User license agreement screen, review and accept the license agreement, and click Next
    • On the Choose Setup Type screen, click Complete
    • On the Ready to Install screen, click Install
    • On the Completion screen, click Finish
  2. Download Log Parser Studio and extract the files

Once LogParser is installed and Log Parser Studio has been extracted, copy the IIS logs from the Exchange server(s) to the local workstation for analysis.

Log Parser Studio Query – SendMail

To determine if devices are re-synchronizing with Exchange, run the Log Parser query to find the users. To do this, follow these steps:

  1. Launch Log Parser Studio by double-clicking LPS.exe
  2. Click the Log folder icon to select files to process
    3616_image30
     

  3. Click the Add Files or Add Folder button, then locate and select the file(s) copied earlier
    3616_image31
     

  4. Verify the file/folder is selected and click OK
  5. Double-click ActiveSync: SendMail from the Library
  6. Click the exclamation point icon to execute the query
    3616_image32
     

  7. Analyze the results for this query by searching for any value in the Status or Error columns. Also look for any HTTP status codes that do not equal 200.
    3616_image65
     

Query Results Analysis

Now we want to review the results of the previous query for any errors.


What error did you find in the query results?

Placeholder_Merged into 91
Placeholder_Merged into 91
QutoaExceeded Error

This error is reporting that the user has exceeded their mailbox quota and cannot send any messages. To resolve this issue, either increase the user’s mailbox storage quota or inform the user to reduce their mailbox size.


Does one of these options resolve the issue?

NoRecipients Error

This error is reporting that the user attempted to send a message without any recipients. The device should not allow this behavior. You may want to review the mailbox logs and/or Fiddler trace for this device to verify that the SendMail command included one or more recipients.


Were you able to verify the device sent one or more recipients in the request?

MailSubmissionFailed Error

The MailSubmissionFailed error is essentially a catch all error message for SendMail failures. The user should attempt to send the message again. Check the Mailbox server event log for any errors or warnings at the time of this message submission.


Were you able to resolve the issue using the event logs on the Mailbox server?

Calendaring Issues

Before we begin troubleshooting, we need to know if the issue can be reproduced on the device. If we can reproduce the issue, then we can capture data during the process to get a better understanding of the issue. Otherwise we will need to examine existing logs to attempt to determine what happened.


Can you reproduce the Calendar issue on the device?

Enable ActiveSync Mailbox Logging; Capture Fiddler Trace; Locate Appointment within the Mailbox; Search for UID

The first step is to enable mailbox logging on the Client Access Server(s) and the user mailbox. Additional information on mailbox logging can be found here. To do this, follow these steps:

Note: This change should be made on Exchange 2013 mailbox servers.

  1. Open Windows Explorer and browse to the Sync folder (C:\Program Files\Microsoft\Exchange Server\V14\ClientAccess\Sync)
  2. Make a copy of the web.config file
  3. Open the web.config file in Notepad and modify the following sections with the values below:
    3616_image16
     

  4. Open IIS Manager
  5. Expand the server and select Application Pools
  6. Right-click on the MSExchangeSyncAppPool and select Stop
  7. Right-click on the MSExchangeSyncAppPool and select Start
  8. Open the Exchange Management Shell
  9. Run the following cmdlet to enable the mailbox logging for a user:
    Set-CASMailbox user -ActiveSyncDebugLogging:$True

Capture Fiddler Trace

ActiveSync device requests do not always reach the destination as desired. To ensure the device request and response is being sent and received as expected, route the device thru an HTTP proxy and review the data. To do this, follow these steps:

  1. Download and install Fiddler onto a workstation
  2. Download EAS Inspector for Fiddler
  3. Extract EASInspectorFiddler.dll into the c:\Program Files\Fiddler2\Inspectors folder
  4. Launch the Fiddler application
  5. Select the Tools menu and select Fiddler Options
  6. Go to the HTTPS tab and select Decrypt HTTPS traffic, click Yes to all prompts
  7. Go to the Connections tab and select Allow remote computers to connect, click OK to any prompt
  8. Click OK and close the Fiddler application
  9. Configure the ActiveSync device to use this workstation as a proxy server(This is typically done under the WiFi settings for the device)
  10. Launch the Fiddler application
  11. Reproduce the issue with the ActiveSync device
  12. Select the File menu and select Capture Traffic to stop the trace

Locate Appointment within the Mailbox

We need to determine the UID for the appointment within the mailbox before we search the mailbox log. To do this, follow these steps:

  1. Download and install MfcMapi
  2. Launch MfcMapi
  3. Go to the Session menu and select Logon
  4. Select the Outlook profile for the mailbox and click OK
  5. Double-click the mailbox to open
  6. Expand the Root Container, expand Top of Information Store, then right-click on the Calendar and select Open contents table
    
    3616_image66
     

  7. Select the appointment within the table, then right-click on the tag 0x80000102 and select Edit property
    3616_image67
     

  8. Copy the Binary value (this will be used to search for the UID in the mailbox log)
    3616_image68
     

Search for UID

We now have the data collected and we are ready to begin troubleshooting. The first step we will take is to look at the mailbox log and check if the appointment was captured. To do this, follow these steps:

  1. Open the Exchange Management Shell
  2. Run the following cmdlet to retrieve the mailbox log for a user:
    Get-ActiveSyncDeviceStatistics -Mailbox user -GetMailboxLog:$True -NotificationEmailAddresses admin@contoso.com
    Note: This will send the ActiveSync mailbox log to the specified email address for analysis. Additional information on mailbox logging can be found here.
  3. Download MailboxLogParser and extract the files
  4. Launch the utility by opening MailboxLogParser.exe
  5. Click Import Mailbox Logs to Grid to open the mailbox log
  6. Enter the UID value you copied earlier under Search raw log data for strings and click Search
    3616_image69
     

  7. Review the search results and make note of the ServerId value for this appointment if found
    3616_image94
     

Were you able to locate the appointment in the mailbox log using the UID?

Placeholder_Merged into 98
Placeholder_Merged into 98
Placeholder_Merged into 98
Analyze Mailbox Log for UID; Check the Final Status of the Appointment

Analyze Mailbox Log for UID

Now that we know we have the appointment within our mailbox log, we need to track the actions taken against the appointment. To do this, follow these steps:

  1. Search for the UID value found earlier

  2. Review the results and analyze the log entries. Check the logs and look for either RequestBody or ResponseBody. If the item appears in the response body, then the item was updated from the server. Otherwise the item appears in the request body which means the item was updated from the client.

  3. Make note of the action (Add, Change, or Delete) and whether the server or client sent the action
  4. Repeat Steps 2-4 until you cannot find any further entries.

Note: Click here for additional information on Exchange ActiveSync mailbox logging analysis.

Check the Final Status of the Appointment

We verified that one or more actions were taken against the appointment within the mailbox log. The end result of the appointment is dependent on the final action. The following describes the expected status of the appointment based on that action:

Add – The appointment should be in the Calendar on the ActiveSync client

Change – The appointment should be updated in the Calendar on the ActiveSync client

Delete – The appointment should be removed from the Calendar on the ActiveSync client


Does the result of the final action meet the expected state of the appointment?

Placeholder_Merged into 102
Fiddler Trace Analysis for UID; Check the Final Status of the Appointment

Fiddler Trace Analysis for UID

We expect the device to send requests related to this appointment. We can use the Fiddler trace to verify that the request was sent by the client and a response was received by the server. To do this, follow these steps:

  1. Open the Fiddler trace
  2. Go to the Edit menu and select Find Sessions
  3. Enter the namespace for ActiveSync (Example: mail.contoso.com) and click Find Sessions
  4. Select requests where the Body column has a value and the HTTP response values that do not equal 200
    3616_image71
     

  5. Select the EAS XML tabs to view the request and response
    3616_image72
     

  6. Locate all requests and responses for the ServerId found earlier

Check the Final Status of the Appointment

We need to verify that the actions taken against the appointment within Fiddler trace align with the mailbox log. The final action should match the mailbox log action found earlier. The following describes the expected status of the appointment based on that action:

Add – The appointment should be in the Calendar on the ActiveSync client

Change – The appointment should be updated in the Calendar on the ActiveSync client

Delete – The appointment should be removed from the Calendar on the ActiveSync client


Does the result of the final action meet the expected state of the appointment?

Placeholder_Merged into 104
Mailbox Log Analysis for Errors

The ActiveSync traffic for this appointment does not result in the appointment being in the correct state on the device. Now we need to review the mailbox log further for issues with ActiveSync requests for the Calendar folder. To do this, follow these steps:

  1. Review the search results from earlier.
    3616_image73
     

  2. Check the Status column for the response and if the value does not equal 1, review the ActiveSync protocol document for more information on the status code.
  3. Also check the log entry for any exception messages.

Note: Click here for additional information on Exchange ActiveSync mailbox logging analysis.


Were there any Status codes that did not equal 1 in the response or any exceptions found in the mailbox log?

Fiddler Trace Analysis for Errors

Based on the results of the mailbox log, the client did not encounter any errors with ActiveSync traffic between the client and Exchange. Next we need to verify that all of the requests from the device did not encounter an error. To do this, follow these steps:

We expect the device to send one or more requests to obtain the latest updates for the folder. We can use the Fiddler trace to verify that the request was sent by the client and a response was received by the server. To do this, follow these steps:

  1. Open the Fiddler trace
  2. Go to the Edit menu and select Find Sessions
  3. Enter the namespace for ActiveSync (Example: mail.contoso.com) and click Find Sessions
  4. Review the Result column for any HTTP response values that do not equal 200
  5. Select requests where the Body column has a value
    3616_image25
     

  6. Select the TextView tab to view the response for additional details
    3616_image26
     

Were there any errors found in the Fiddler trace for the Calendar requests?

Install Log Parser Studio; Log Parser Studio Query – Device Calendar requests; Query Results Analysis; Re-Sync the Calendar Folder

Install Log Parser Studio

The ActiveSync client may have encountered errors while attempting to communicate with the Exchange server. Now we need to determine where these errors originated. We will start by checking the IIS logs on the Client Access Server. Before these logs can be analyzed, the workstation where the analysis will be completed should have Log Parser Studio installed. To do this, follow these steps:

  1. Download and install LogParser
    • Double-click the LogParser.msi to begin the installation
    • Click Run if the Open File – Security Warning is displayed
    • On the Welcome screen, click Next
    • On the End-User license agreement screen, review and accept the license agreement, and click Next
    • On the Choose Setup Type screen, click Complete
    • On the Ready to Install screen, click Install
    • On the Completion screen, click Finish
  2. Download Log Parser Studio and extract the files

Once LogParser is installed and Log Parser Studio has been extracted, copy the IIS logs from the Exchange server(s) to the local workstation for analysis.