Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

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()..."


↑ Back to the top


Cause

This error can occur if a prior configuration attempt partially created a CRM data file in Outlook.

↑ Back to the top


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.

↑ Back to the top


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)

↑ Back to the top


Keywords: kbmbspartner, kbmbsmigrate, kbsurveynew, kb

↑ Back to the top

Article Info
Article ID : 3182511
Revision : 1
Created on : 1/7/2017
Published on : 7/27/2016
Exists online : False
Views : 303