Error occurs when you run the "Synchronize with CRM" function in the Microsoft Dynamics CRM 2011 client for Outlook

Article ID: 2616319 - View products that this article applies to.
Expand all | Collapse all

Symptoms

Assume that you use the Microsoft Dynamics CRM 2011 client for Microsoft Office Outlook and that folder redirection is enabled on the client. When you try to track an item or run the Synchronize with CRM function in this situation, you receive an error message that resembles the following:
[2011-09-07 11:11:08.517] Process:OUTLOOK |Organization:00000000-0000-0000-0000-000000000000 |Thread: 24 |Category: Exception |User: 00000000-0000-0000-0000-000000000000 |Level: Error | CrmException..ctor
at CrmException..ctor(String message, Exception innerException, Int32 errorCode, Boolean isFlowControlException)
at CrmException..ctor(String message, Exception innerException)
at CrmSqlCeConnection.<Open>b__2(SqlCeException ex)
at ExceptionFilter.TryFilter(Action body, Predicate`1 filter, Action`1 catchClause)
at IdMappingTable.MarkAllItemsNotVisited()
>Crm Exception: Message: SQL CE Database file is being used by a different process, ErrorCode: -2147220970, InnerException: There is a file sharing violation. A different process might be using the file. [ \\<server>\C$\<user>\Microsoft\MSCRM\Client\OutlookSyncCache.sdf ].

Cause

This problem occurs because of a limitation in Microsoft SQL Server 2000 Windows CE Edition 3.5 (SQL Server CE 3.5). 

Resolution

NOTE: After Microsoft Dynamics CRM for Outlook Update Rollup 15 has been applied, it will automatically upgrade to SQL CE 4.0. Therefore, the resolution below is only necessary for Update Rollup 14 and lower.

To run Microsoft Dynamics CRM 2011 when the Application Data folder is located on a remote share, follow these steps:
  1. Install SQL Server CE 4.0. To do this, visit the following Microsoft website:
    http://www.microsoft.com/download/en/details.aspx?id=17876
    Notes
    • This step requires elevated permissions.
    • In SQL Server CE 4.0, 64-bit clients do not have to install the 32-bit version.
  2. Add the following XML code under the configuration element in the CrmClient{14B13B7A-CA08-40bd-AC60-8C45367E807C}.config file that is located in the Program Files\MSCRM\Client folder:
    <runtime>
     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
       <dependentAssembly>
          <assemblyIdentity name="System.Data.SqlServerCe" publicKeyToken="89845dcd8080cc91" culture="neutral" />
          <bindingRedirect oldVersion="3.5.1.0"
          newVersion="4.0.0.0"/>
       </dependentAssembly>
     </assemblyBinding>
    </runtime>
    Notes
    • This step requires elevated permissions.
    • Make sure that you add this code before the </configuration> tag.
  3. Additionally, there is a second configuration file that the configuration wizard calls. The file is named Microsoft.Crm.Application.Outlook.ConfigWizard.exe.config, and the file is located in the C:\Program Files\Microsoft Dynamics CRM\Client\ConfigWizard folder:
    <configuration>
      <startup>
        <supportedRuntime version="v4.0.30319" />
      </startup>
      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <probing privatePath="..\bin"/>
          <dependentAssembly>
            <assemblyIdentity name="System.Data.SqlServerCe"
            publicKeyToken="89845dcd8080cc91"
            culture="neutral" />
            <bindingRedirect oldVersion="3.5.1.0"
            newVersion="4.0.0.0"/>
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
      <system.net>
        <defaultProxy useDefaultCredentials="true" />
      </system.net>
    </configuration>
  4. Delete all SDF files in the %localappdata% and %appdata% folders. For more information, see the "List of databases in CRM" section.

    Note
    SDF files that were created in SQL Server CE 3.5 are incompatible with SQL Server CE 4.0.

Warning

After you upgrade from SQL Server CE 3.5 to SQL Server CE 4.0, you may experience a decrease in performance the first time that you run Microsoft Dynamics CRM. This behavior occurs because Microsoft Dynamics CRM must re-create all caches. Some caches are affected by the size of the Inbox.

Verification steps

To verify that you applied the resolution correctly, follow these steps:
  1. Start Outlook after you perform all the steps from earlier in the "Resolution" section.
  2. Make sure that the Microsoft Dynamics CRM plug-in starts correctly.
  3. Start the Process Explorer tool. To download Process Explorer, visit the following Microsoft website:
    http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx
  4. Find the Outlook.exe process, and then double-click it.
  5. Select the .NET Assemblies tab, and then expand AppDomain: SharedDomain if it is not expanded already.
  6. Find System.Data.SqlServerCe in the list. Make sure that the path contains the following version of SQL Server CE:

    C:\windows\assembly\GAC_MSIL\System.Data.SqlServerCe\4.0.

    Note If the path contains SQL Server CE 3.5.1.0, assembly redirection will not work.

List of databases in CRM

  • %LocalAppData%\Microsoft\MSCRM\Client
    • CrmCache.sdf

      Note
       This file contains non-metadata platform caches.
    • {Guid}[true|false].sdf

      Note
      This file contains MAPI store internal storage.

    Note There may be multiple files of this kind for offline and online use.
  • %AppData%\Microsoft\MSCRM\Client
    • EmailCache.sdf

      Note
       This file contains mappings between CRM and MAPI items.
    • OutlookSyncCache.sdf

      Note
      This file contains internal state for sync.

More information

In order to use folder redirection in Microsoft Dynamics CRM, you must use Universal Naming Convention (UNC) paths.

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

More information

For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates
For more information about Microsoft Business Solutions CRM software hotfix and update package terminology, click the following article number to view the article in the Microsoft Knowledge Base:
887283 Microsoft Business Solutions CRM software hotfix and update package naming standards

Properties

Article ID: 2616319 - Last Review: November 7, 2013 - Revision: 8.0
Applies to
  • Microsoft Dynamics CRM 2011
  • Microsoft CRM client for Microsoft Office Outlook
Keywords: 
kbmbsmigrate kbsurveynew kbqfe kbfix kbexpertiseinter kberrmsg KB2616319

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com