共用方式為


Troubleshooting tips

 

Applies To: Dynamics CRM 2013

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 2013 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 the Microsoft Dynamics CRM SDK package. Do not 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