The following information is provided as an aid in diagnosing certain common issues that may arise when developing Microsoft Dynamics CRM SDK based applications. More content will be added to this topic as time goes on.
For more information about enabling tracing in an on-premises Microsoft Dynamics CRM 2011 server, see Monitoring and troubleshooting Microsoft Dynamics CRM.
MessageSecurityException when connecting to the Web Services
When using the SDK to connect to the Microsoft Dynamics CRM Online organization or discovery services you receive the following exception:
Unhandled Exception: System.ServiceModel.Security.MessageSecurityException: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.
Try deleting the device registration folder named
LiveDeviceID in your profile folder
C:\Users\<username>. Next, try to connect again.
Exception when running CrmSvcUtil
When you run the CrmSvcUtil.exe tool to generate early-bound entity types, you might receive an exception with the following message.
The type initializer for 'Microsoft.Xrm.Client.CodeGeneration.CodeCustomization' threw an exception.
This error can be caused if the build version of the CrmSvcUtil tool and Microsoft.Xrm.Client.CodeGeneration.dll assembly are not the same. When you develop applications using the Microsoft Dynamics CRM SDK, always use the CrmSvcUtil tool and assemblies that are provided in the Bin folder of the SDK download. Do not use the tool or assemblies from the Tools folder of a Microsoft Dynamics CRM server installation.
ArgumentNullException when a custom workflow activity executes
After downgrading an on-premises server from Microsoft Dynamics CRM 2011 Update Rollup 12 to a previous release, any custom workflow activities registered in the sandbox on that server will fail with a System.ArgumentNullException exception when executed. Partial trust (sandboxed) custom workflow activities require the Microsoft Dynamics CRM 2011 Update Rollup 12 release. To correct the problem, unpublish any workflows that use those custom workflow activities, and then unregister those custom workflow activities that execute in the sandbox.
Other ResourcesTroubleshooting and Error Handling
Microsoft Dynamics CRM 2011
Send comments about this topic to Microsoft.
© 2013 Microsoft Corporation. All rights reserved.