Tuesday, February 17, 2009

Rollup 2 and Registry Keys

After installing CRM 4.0 Rollup 2 which was released late last month, I found myself saying, "Hey! I thought that was supposed to be fixed!". The particular problem I noticed was that CRM Hosting Process was reserving a significant amount of memory over time which was supposed to be fixed in this last rollup. Well, as it turns out, it was fixed.

If you read very carefully at the KB article for the rollup, you'll notice that there are "Hotfixes and updates that you have to enable or configure manually". It turns out we need to add registry keys to enable this feature: Add a Dword to the registry entitled EnablePeriodicCollection under the key HKEY_CURRENT_USER\Software\Microsoft\MSCRMClient\ and set its value to 1. There is a short list of fixes that need to be manually activated by modifying registry keys and running sql queries.

That got me curious though, what manually activated fixes did I miss in rollup 1? It turns out another somewhat important fix (at least as far as outlook performance is concerned) needs to be manually activated from rollup 1. This fix allows Outlook to continue loading even if the CRM addin hasn't completed loading. To enable this fix, add a Dword to the registry entitled DelayUIDuringAddinInit under the key HKEY_CURRENT_USER\Software\Microsoft\MSCRMClient\ and set its value to 1.

Here's the short list of manually activated fixes for rollup 2:
http://support.microsoft.com/kb/955452/ - Line feeds are not used when you send an e-mail message that uses an e-mail template to render data that has line feeds in Microsoft Dynamics CRM 4.0
http://support.microsoft.com/kb/955745/ - Error message when you try to configure the Microsoft Dynamics CRM 4.0 client for Outlook: "This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms"
http://support.microsoft.com/kb/956527/ - The Microsoft Dynamics CRM client for Outlook consumes three times as much memory in version 4.0 as in version 3.0
http://support.microsoft.com/kb/959248/ - Microsoft Dynamics CRM 4.0 slows to unacceptable levels when you process e-mail messages by using the Microsoft Dynamics CRM E-mail Router
http://support.microsoft.com/kb/957871/ - The Workflow Expansion Task records cause the AsyncOperationBase table in the MSCRM database to grow too large in Microsoft Dynamics CRM 4.0


Here's the short list of manually activated fixes for rollup 1:
http://support.microsoft.com/kb/950175/ - You cannot use Outlook as expected until all Microsoft Dynamics CRM 4.0 add-ins are loaded
http://support.microsoft.com/kb/953340/ - E-mail messages from a CRM user to a queue are not delivered in Microsoft Dynamics CRM 4.0

Monday, February 9, 2009

CRM Workflow Error with Rollup 2

Ran into a problem with workflow and CRM Rollup 2 today. We were getting errors after attempting to publish any workflow. Turned on tracing and the following popped up into the logs:

Error Number: 0x80045001

Error Message: Workflow compilation failed:
WF1399: Activity 'CreateStep5_policy' validation failed: Property "RuleSetReference" has an invalid value. Rule set is invalid. Rule "main" validation failed. Type System.Globalization.CultureInfo is not marked as authorized in the application configuration file.


Thanks to Tom Cadman on the Microsoft forums for pointing out that this was caused by some missing lines in the CRM web.config:
<!--
* CRM SE 6681 V4: Hotfix needed for CRM Workflows before WF.Net security patch
-->

<authorizedType Assembly="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System" TypeName="Void" Authorized="True"/>
<authorizedType Assembly="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.Reflection" TypeName="AssemblyFileVersionAttribute" Authorized="True"/>
<authorizedType Assembly="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.Reflection" TypeName="AssemblyVersionAttribute" Authorized="True"/>
<!--
* CRM SE 5934 V4: Workflow Designer and Runtime Do Not Handle Decimal Numbers Correctly
-->

<authorizedType Assembly="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.Globalization" TypeName="CultureInfo" Authorized="True"/>