"Unable to cast object" error when configuring Microsoft Dynamics CRM for Microsoft Office Outlook

Symptoms
When attempting to configure Microsoft Dynamics CRM for Microsoft Office Outlook, you receive the following error:

"There is a problem communicating with the Microsoft Dynamics CRM server. The server might be unavailable. Try again later. If the problem persists, contact your system administrator.

Unable to cast object of type 'System.Int32' to type 'System.String'.    at Microsoft.Crm.Application.Outlook.Config.OutlookCRMDatastoreInstaller.GetAllCRMOrgsInOutlookProfile()..."


Cause
This error can occur if a prior configuration attempt partially created a CRM data file in Outlook.
Resolution
Follow the steps below to remove the incomplete CRM data file in Outlook:

1. Open the Control Panel in Windows. If you cannot locate Control Panel, click Start and search for "Control Panel".

2. Use the Search textbox to search for "mail".

3. Click Mail.

4. Click the Data Files button.

5. If a row appears with the name of Microsoft Dynamics CRM Database, select it and then click Remove.

6. Click Yes when prompted to confirm.

7. Close the Data Files dialog.

8. Attempt to configure CRM for Outlook again.

If you still encounter issues installing, enabling, or connecting CRM for Outlook with a CRM Online organization, run the Microsoft Support and Recovery Assistant.
More information
The error found in the log file contains the following detail:

Error| Exception : Unable to cast object of type 'System.Int32' to type 'System.String'.    at Microsoft.Crm.Application.Outlook.Config.OutlookCRMDatastoreInstaller.GetAllCRMOrgsInOutlookProfile()
   at Microsoft.Crm.Application.Outlook.Config.ConfigInfo..ctor()
   at Microsoft.Crm.Application.Outlook.Config.MainForm..ctor()
   at Microsoft.Crm.Application.Outlook.Config.ClientConfig.CreateAndShowForm(Boolean runInsideOutlook)
   at Microsoft.Crm.Application.Outlook.Config.ClientConfig.AddDeployment_FullUI(Boolean runInsideOutlook)
   at Microsoft.Crm.Application.Outlook.Config.ClientConfig.Run(Boolean runInsideOutlook)
   at Microsoft.Crm.Application.Outlook.Config.ClientConfig.Start(String[] args, Boolean runInsideOutlook)
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.
Properties

Article ID: 3182511 - Last Review: 07/27/2016 17:45:00 - Revision: 1.0

Dynamics CRM Online, Microsoft Dynamics CRM 2016, Microsoft CRM client for Microsoft Office Outlook, Microsoft Dynamics CRM 2015, Microsoft Dynamics CRM 2013

  • kbmbsmigrate kbsurveynew KB3182511
Feedback