Tuesday, October 8, 2013

Errors in CRM for Outlook 2011 when connecting to CRM

I recently had a customer who upgraded their Dynamics CRM 2011 system from update roll-up 11 to roll-up 14, and due to strict policies in the production environment they wanted to test the roll-up 14 for the Outlook client on a pilot group before rolling it out to all users.

After using CRM with the newest rollup for several weeks they suddenly encountered an error where Outlook clients no longer could connect to the servers, and it happened to a lot of users in a short amount of time. When checking the error messages we found that the clients had issues trying to synchronize with the servers (normal synchronization, offline mode disabled), and we found out that they recently imported a new version of their solution during the weekend. All the users who experienced the problem could connect to CRM in their web browser, and a quick check on the servers did not show any errors in the event log. Needless to say this points to an issue with the client.

Proceed to default troubleshooting procedures:
We found a test client we could use, booted up the same image the customer use on their clients with the same version of software and updates, and tried to connect to CRM through Outlook. Like the rest of the users this gave us the following error:



08:56:44|  Error| Exception : Must specify valid information for parsing in the string.    at System.Enum.EnumResult.SetFailure(ParseFailureKind failure, String failureMessageID, Object failureMessageFormatArgument)

   at System.Enum.TryParseEnum(Type enumType, String value, Boolean ignoreCase, EnumResult& parseResult)

   at System.Enum.Parse(Type enumType, String value, Boolean ignoreCase)

   at Microsoft.Crm.Platform.ConvertHelper.EnumFromXmlString(Type enumType, String mask)

   at Microsoft.Crm.Metadata.AttributeDescription.FillPropertiesFromXml(XmlNode node, Boolean throwIfIdsMissing)

   at Microsoft.Crm.Metadata.NonSharableMetadataCacheLoader.<>c__DisplayClass7.<LoadDescriptionsFromXml>b__6(IFillableMetadataDescription description, XmlNode node, Boolean newIterator)

   at Microsoft.Crm.Metadata.NonSharableMetadataCacheLoader.LoadDescriptionsFromXml(String name, MetadataContainer container, CounterList counter, IEnumerable`1 navs, IEnumerable`1 paths, LoadDescriptionFromXmlDelegate LoadDescriptionFromXmlDelegate)

   at Microsoft.Crm.Metadata.NonSharableMetadataCacheLoader.LoadDescriptionsFromXml(String name, MetadataContainer container, CounterList counter, IEnumerable`1 navs, String[] paths)

   at Microsoft.Crm.Metadata.NonSharableMetadataCacheLoader.LoadDescriptionsFromXml(String name, MetadataContainer container, CounterList counter, XPathNavigator nav, String path)

   at Microsoft.Crm.Metadata.NonSharableMetadataCacheLoader.BuildContainerFromXml(XmlDocument xmlDocument, LoadMasks masks, CounterList counter)

   at Microsoft.Crm.Metadata.NonSharableMetadataCacheLoader.LoadCacheFromXml(XmlDocument xmlDocument, LoadMasks masks, CounterList counter)

   at Microsoft.Crm.Metadata.DynamicMetadataCacheFactory.LoadCacheFromWebService(DynamicMetadataCacheLoader loader, LoadMasks masks, IOrganizationContext context, Boolean writeCacheToLocalFile, CounterList counter)

   at Microsoft.Crm.Metadata.DynamicMetadataCacheFactory.LoadCacheForRichClient(LoadMethod loadMethod, DynamicMetadataCacheLoader loader, LoadMasks masks, IOrganizationContext context, CounterList counter)

   at Microsoft.Crm.Metadata.DynamicMetadataCacheFactory.LoadMetadataCache(LoadMethod method, CacheType type, IOrganizationContext context)

   at Microsoft.Crm.Metadata.MetadataCache.LoadCache(IOrganizationContext context, Boolean fileOnlyIfExists)

   at Microsoft.Crm.Metadata.MetadataCache.GetInstance(IOrganizationContext context)

   at Microsoft.Crm.Application.Outlook.Config.OutlookConfigurator.InitializeMapiStoreForFirstTime()

   at Microsoft.Crm.Application.Outlook.Config.OutlookConfigurator.Configure(IProgressEventHandler progressEventHandler)
   at Microsoft.Crm.Application.Outlook.Config.ConfigEngine.Configure(Object stateInfo)

At this point we decided to turn on tracing and collected the error from the trace log as well (English and Norwegian error message):


>Error occurred while refreshing registry cache, cache has been cleared. Exception: System.IO.IOException: Det er ikke mer data tilgjengelig.
>Error occurred while refreshing registry cache, cache has been cleared. Exception: System.IO.IOException: No more data is available

These error messages made me suspect that the issue was content in the new solution which was not supported by the older roll-up version on the client, so we updated the client to update rollup 14 and tried again. As suspected this fixed the issues and allowed the client to successfully connect and synchronize with the servers.

At this point I would like to say that we informed our customer about the dangers of running different versions of the software on the server and client, and we highly recommended installing the updated client on all computers as soon as possible. However, after testing this in their staging environment without any errors they decided to proceed with a prolonged pilot group in production.

On the positive side, update roll-up 12 (and newer) includes some great improvements in the Outlook client which makes it a less chatty, so the users will be able to enjoy a faster, smoother CRM experience with the newest roll-up on both the servers and the client.

Thursday, May 2, 2013

CRM 2011 - The instance name must be the same as computer name

This is a tricky error message I got a while back which I found a pretty simple solution to. Sometimes when you import an organization, create a new org you'll encounter this issue (or if you're unlucky; during CRM installation):
  • The instance name must be the same as computer name
The reason for this error is that the machine name is configured incorrectly for the CRM instance, and can be remedied by running a few simple queries.

First, check out the computer name for the server running SQL Server (hit win key + pause/break or open computer properties from the control panel), then open SQL Server Management Studio (SSMS) and run the following query:

SELECT  @@SERVERNAME;
EXEC sp_helpserver;
GO


If the Windows computer name and the SQL Server instance configured names are mismatched then run the following queries to fix the issue (I take no responsibility for any changes you make to your system).
N.B. If you are running a SQL Server cluster then you really should know what you're doing at this point, do not follow this blog blindly.

EXEC sp_dropserver "Wrong server name here";
EXEC sp_addserver "Correct server name here", local;
GO

Now restart the SQL Server service and the CRM import/creation/repair should complete successfully.