System.TypeInitializationException

Nov 9, 2011 at 6:43 PM

I've registered the assembly per the instructions. I have also created a counter and bound it to the new_partneridnumber field (which is a single line of text) of the new_partner entity.

I'm seeing the following exception when I attempt to create a new partner:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.TypeInitializationException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #DDDCDD48Detail: 
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
  <ErrorCode>-2147220970</ErrorCode>
  <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
  <Message>System.TypeInitializationException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #DDDCDD48</Message>
  <Timestamp>2011-11-09T19:38:22.9837055Z</Timestamp>
  <InnerFault i:nil="true" />
  <TraceText>

[CRM.Plugin.SequenceGenerator: CRM.Plugin.SequenceGenerator.SequenceGenerator]
[953d708b-040b-e111-83d1-005056ba0012: CRM.Plugin.SequenceGenerator.SequenceGenerator: Create of new_partner]


</TraceText>
</OrganizationServiceFault>


Nov 15, 2011 at 12:02 AM

I think your CRM does not accept the Mutex code. You'll have to comment out the use of Mutex in the source code. Rebuild dll re-register.  This worked for me. 

Jan 4, 2012 at 4:32 PM

How do you rebuild the dll!!>?

Coordinator
Jan 13, 2012 at 10:03 AM

Hey Cody.

Download the source code and use Visual Studio to compile the solution. Change any if you have to.

cheers

jaimie

Jul 27, 2012 at 2:11 PM

Did anyone figure out why this CRM was not accepting the mutex code?  I'm having a similar problem, and it appears that when it is registered for multiple tenants one of the tenants has this error.

Coordinator
Jul 30, 2012 at 10:34 AM

I have refreshed the assembly and the source code. Let me know if you have more problems.

Jaimie