Error: Microsoft.Crm.Setup.Server.PublishDefaultDataAction

When you have uninstalled CRM and try to install this again, you might run into the following error message:

Microsoft.Crm.Setup.Server.PublishDefaultDataAction failed --->System.MissingMethodException: Method not found: 'Void Microsoft.Crm.CrmCache`1.RemoveEntry(System.String)'.

This is being caused by the fact that you have other components of CRM still installed from the previous installation. Make sure you remove all components including the SSRS connector, the Outlook client and the E-mail router. That should help you fix the problem.

Kudos go out to my colleague Alex Ries who found this solution.

For reference purposes the exact log message (can be found in %\AppData\Microsoft\MSCRM\Logs).

05:45:38|Verbose| Web Wizard import: Success
05:45:38|Verbose| Business Task import: Success
05:45:38| Info| Executing Install action: Microsoft.Crm.Setup.Server.PublishDefaultDataAction
05:45:50| Error| System.Exception: Action Microsoft.Crm.Setup.Server.PublishDefaultDataAction failed. ---> System.MissingMethodException: Method not found: 'Void Microsoft.Crm.CrmCache`1.RemoveEntry(System.String)'.
at Microsoft.Crm.Caching.CrmMultiOrgCache`2.RemoveEntry(Guid organizationId, TKey key, Boolean fireNotification)
at Microsoft.Crm.Caching.CrmMultiOrgCache`2.RemoveEntry(Guid organizationId, TKey key)
at Microsoft.Crm.Metadata.LabelCache.Flush(Int32 languageCode, IOrganizationContext context, CacheType cacheType)
at Microsoft.Crm.Setup.Server.Utility.NewOrgUtility.OrganizationPublishDefaultData(Guid organizationId)
at Microsoft.Crm.Setup.Server.PublishDefaultDataAction.Do(IDictionary parameters)
at Microsoft.Crm.Setup.Common.Action.ExecuteAction(Action action, IDictionary parameters, Boolean undo)
--- End of inner exception stack trace ---, Error, RetryCancel, Option1

The path is not of a legal form

While installing the Dynamics CRM Data Migration Manager on a Dynamics CRM server, you might get this error message:

The path is not of a legal form

To solve this error you should go to the registry and change the InstallLocation of the CRM server. The location is different for x86 and x64, but can easily be found by going to:


In this key you should search for the key which contains "Microsoft Dynamics CRM Server". This should bring you to a location like:


In this key you should set the value for "InstallLocation" to "C:\Program Files\Microsoft Dynamics CRM ". The installation of the Dynamics CRM Data Migration Manager will then continue.

Credits for this solution go out to the CRM community where I found this solution.

Unexpected 401 when using NetworkService in Web Service call

When you are calling any CRM Web Service and you decide to specify your own credentials by using a new instance of NetworkCredential, then you should make sure that you are not specifying the 'UseDefaultCredentials' after you have specified the Credentials. This will cause IIS to not fully understand how to authenticate. The result is that you will get this 401.2 error message: Unauthorized: Access is denied due to server configuration. Internet Information Services (IIS).

So this code causes the error message:

CrmService service = new CrmService();
service.Credentials = new System.Net.NetworkCredential("user", "pwd", "domain");
service.UseDefaultCredentials = false;
service.CrmAuthenticationTokenValue = token;

And this is how it should be:

CrmService service = new CrmService();
service.Credentials = new System.Net.NetworkCredential("user", "pwd", "domain");
service.CrmAuthenticationTokenValue = token;