Share via


Troubleshooting tips

 

Applies To: Dynamics CRM 2015

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 2015 server, see TechNet: Monitor and troubleshooting Microsoft Dynamics CRM.

Handle the MessageSecurityException exception when you use the CRM web services

When you use the CRM APIs to connect to the Microsoft Dynamics CRM Online organization or discovery services you could 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.

To fix this, you can try deleting the device registration folder named LiveDeviceID in your profile folder C:\Users\<username>. Then, try to connect again.

Exceptions that can occur 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 aren’t 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 the Microsoft Dynamics CRM SDK package. Don’t use the tool or assemblies from the Tools folder of a Microsoft Dynamics CRM server installation.

See Also

Troubleshooting and error handling
Web service error codes

© 2016 Microsoft. All rights reserved. Copyright