Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum
Answered

Microsoft.Xrm.Sdk.Organisation service Fault

Posted on by 80
 
Hello everyone, after migration from  Dynamics CRM 8.2 on premise to on premise 9.1 got next error for custom plugins and workflows. How it can be resolved?
In Dynamics server bin folder lays Newtosoft.json version 13.0.1
Thank you
 
Unhandled exception: 
Exception type: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]
Message: An unexpected error occurred.Detail: 
<OrganizationServiceFault xmlns:i=/http://www.w3.org/2001/XMLSchema-instance/ xmlns=/http://schemas.microsoft.com/xrm/2011/Contracts/>
  <ActivityId>773e1f4d-546c-420c-90f9-0fdf74856b35</ActivityId>
  <ErrorCode>-2147220970</ErrorCode>
  <ErrorDetails xmlns:d2p1=/http://schemas.datacontract.org/2004/07/System.Collections.Generic/>
    <KeyValuePairOfstringanyType>
      <d2p1:key>ApiExceptionSourceKey</d2p1:key>
      <d2p1:value xmlns:d4p1=/http://www.w3.org/2001/XMLSchema/ i:type=/d4p1:string/>Plugin/Microsoft.Dynamics.Sales.Plugins.PreOperationInvoiceRetrieve</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <d2p1:key>ApiOriginalExceptionKey</d2p1:key>
      <d2p1:value xmlns:d4p1=/http://www.w3.org/2001/XMLSchema/ i:type=/d4p1:string/>Microsoft.Crm.CrmException: An unexpected error occurred. ---&gt; System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) ---&gt; System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
   --- End of inner exception stack trace ---
   at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes)
   at System.Reflection.RuntimeAssembly.GetExportedTypes()
   at Microsoft.Xrm.Sdk.KnownTypesProvider.get_KnownOrganizationRequestResponseTypes()
   at Microsoft.Xrm.Sdk.KnownTypesResolver.ResolveName(String typeName, String typeNamespace, Type declaredType, DataContractResolver knownTypeResolver)
   at System.Runtime.Serialization.XmlObjectSerializerContext.ResolveDataContractFromDataContractResolver(XmlQualifiedName typeName, Type declaredType)
   at System.Runtime.Serialization.XmlObjectSerializerContext.ResolveDataContractFromKnownTypes(String typeName, String typeNs, DataContract memberTypeContract, Type declaredType)
   at System.Runtime.Serialization.XmlObjectSerializerContext.IsKnownType(DataContract dataContract, Type declaredType)
   at System.Runtime.Serialization.XmlObjectSerializerContext.IsKnownType(DataContract dataContract, Dictionary`2 knownDataContracts, Type declaredType)
   at System.Runtime.Serialization.KnownTypeDataContractResolver.TryResolveType(Type type, Type declaredType, DataContractResolver knownTypeResolver, XmlDictionaryString&amp; typeName, XmlDictionaryString&amp; typeNamespace)
   at Microsoft.Xrm.Sdk.KnownTypesResolver.TryResolveType(Type type, Type declaredType, DataContractResolver knownTypeResolver, XmlDictionaryString&amp; typeName, XmlDictionaryString&amp; typeNamespace)
   at System.Runtime.Serialization.XmlObjectSerializerWriteContext.ResolveType(Type objectType, Type declaredType, XmlDictionaryString&amp; typeName, XmlDictionaryString&amp; typeNamespace)
   at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteTypeInfo(XmlWriterDelegator writer, DataContract contract, DataContract declaredContract)
   at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithXsiTypeAtTopLevel(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle originalDeclaredTypeHandle, Type graphType)
   at System.Runtime.Serialization.DataContractSerializer.InternalWriteObjectContent(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
   at System.Runtime.Serialization.DataContractSerializer.InternalWriteObject(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
   at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
   at System.Runtime.Serialization.XmlObjectSerializer.WriteObject(XmlDictionaryWriter writer, Object graph)
   at System.Runtime.Serialization.XmlObjectSerializer.WriteObject(Stream stream, Object graph)
   at Microsoft.Crm.Extensibility.InprocessServiceProxy.ConvertToLateBound[T](Object o)
   at Microsoft.Crm.Extensibility.InprocessServiceProxy.ExecuteCore(OrganizationRequest request)
   at Microsoft.Dynamics.Solution.Common.PriceService.PricingDecimalPrecisionFromMetadata()
   at Microsoft.Dynamics.Solution.Common.PriceService.CalculatePriceInternal(Entity entity, Guid lineItemId, Boolean skipQOIDetailPricing, Boolean overridePricePerUnitLock, Boolean overrideDiscountLock, IPluginContext context)
   at Microsoft.Dynamics.Solution.Common.PriceService.&lt;&gt;c__DisplayClass28_0.&lt;CalculatePrice&gt;b__0()
   at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action, IEnumerable`1 additionalCustomProperties)
   at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
   at Microsoft.Dynamics.Solution.Common.PluginInternalLogger.Execute(XrmTelemetryActivityType activityType, Action action)
   at Microsoft.Dynamics.Solution.Common.PriceService.CalculatePrice(Entity entity, Guid lineItemId, Boolean skipQOIDetailPricing, Boolean overridePricePerUnitLock, Boolean overrideDiscountLock, IPluginContext context)
   at Microsoft.Crm.Sales.ObjectModel.QOIPriceService.CalculatePrice(Guid qoiId, Guid lineItemId, Boolean skipLineItemPricing, Boolean overridePricePerUnitLock, Boolean overrideDiscountLock, Boolean isModifiedBySystem, IPluginContext context)
   at Microsoft.Crm.Sales.ObjectModel.InvoiceService.CalculatePrice(Guid qoiId, Guid qoiDetailId, Boolean skipQOIDetailPricing, Boolean overridePricePerUnitLock, Boolean overrideDiscountLock, Boolean isModifiedBySystem, PriceCalculationSettings priceSettings, IPluginContext context)
   at Microsoft.Crm.Sales.ObjectModel.CalculatePriceService.DoCalculatePriceInternal(EntityReference entityRef, EntityReference parentRef, QOIService qoiService, PriceCalculationSettings priceSettings, IPluginContext context)
   at Microsoft.Crm.Sales.ObjectModel.CalculatePriceService.CalculatePrice(EntityReference entityRef, EntityReference parentId, QOIService qoiService, IPluginContext context)
   at Microsoft.Dynamics.Sales.Plugins.PreOperationInvoiceRetrieve.ExecuteCrmPlugin(LocalPluginContext localContext)
   at Microsoft.Dynamics.Solution.Common.PluginBase.Execute(IServiceProvider serviceProvider)
   at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
   at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
   --- End of inner exception stack trace ---
   at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
   at Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)
   at Microsoft.Crm.Extensibility.Pipeline.&lt;&gt;c__DisplayClass3_0.&lt;RunStep&gt;b__0()</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <d2p1:key>ApiStepKey</d2p1:key>
      <d2p1:value xmlns:d4p1=/http://schemas.microsoft.com/2003/10/Serialization// i:type=/d4p1:guid/>70e7e718-6f68-e611-80ed-00155d36100d</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <d2p1:key>ApiDepthKey</d2p1:key>
      <d2p1:value xmlns:d4p1=/http://www.w3.org/2001/XMLSchema/ i:type=/d4p1:int/>2</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <d2p1:key>ApiActivityIdKey</d2p1:key>
      <d2p1:value xmlns:d4p1=/http://schemas.microsoft.com/2003/10/Serialization// i:type=/d4p1:guid/>773e1f4d-546c-420c-90f9-0fdf74856b35</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <d2p1:key>ApiPluginSolutionNameKey</d2p1:key>
      <d2p1:value xmlns:d4p1=/http://www.w3.org/2001/XMLSchema/ i:type=/d4p1:string/>msdynce_Sales</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <d2p1:key>ApiStepSolutionNameKey</d2p1:key>
      <d2p1:value xmlns:d4p1=/http://www.w3.org/2001/XMLSchema/ i:type=/d4p1:string/>msdynce_Sales</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <d2p1:key>ApiExceptionCategory</d2p1:key>
      <d2p1:value xmlns:d4p1=/http://www.w3.org/2001/XMLSchema/ i:type=/d4p1:string/>SystemFailure</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <d2p1:key>ApiExceptionMesageName</d2p1:key>
      <d2p1:value xmlns:d4p1=/http://www.w3.org/2001/XMLSchema/ i:type=/d4p1:string/>UnExpected</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <d2p1:key>ApiExceptionHttpStatusCode</d2p1:key>
      <d2p1:value xmlns:d4p1=/http://www.w3.org/2001/XMLSchema/ i:type=/d4p1:int/>400</d2p1:value>
    </KeyValuePairOfstringanyType>
  </ErrorDetails>
  <HelpLink>http://go.microsoft.com/fwlink/?LinkID=398563&amp;error=Microsoft.Crm.CrmException%3a80040216&amp;client=platform</HelpLink>
  <Message>An unexpected error occurred.</Message>
  <Timestamp>2024-02-28T22:58:50.9096023Z</Timestamp>
  <ExceptionRetriable>false</ExceptionRetriable>
  <ExceptionSource i:nil=/true/ />
  <InnerFault>
    <ActivityId>773e1f4d-546c-420c-90f9-0fdf74856b35</ActivityId>
    <ErrorCode>-2147220970</ErrorCode>
    <ErrorDetails xmlns:d3p1=/http://schemas.datacontract.org/2004/07/System.Collections.Generic/ />
    <HelpLink i:nil=/true/ />
    <Message>System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' ---&gt; System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM//Software//Microsoft//Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM//Software//Microsoft//Fusion!EnableLog].
   at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes)
   at System.Reflection.RuntimeAssembly.GetExportedTypes()
   at Microsoft.Xrm.Sdk.KnownTypesProvider.get_KnownOrganizationRequestResponseTypes()
   at Microsoft.Xrm.Sdk.KnownTypesResolver.ResolveName(String typeName, String typeNamespace, Type declaredType, DataContractResolver knownTypeResolver)
   at System.Runtime.Serialization.XmlObjectSerializerContext.ResolveDataContractFromDataContractResolver(XmlQualifiedName typeName, Type declaredType)
   at System.Runtime.Serialization.XmlObjectSerializerContext.ResolveDataContractFromKnownTypes(String typeName, String typeNs, DataContract memberTypeContract, Type declaredType)
   at System.Runtime.Serialization.XmlObjectSerializerContext.IsKnownType(DataContract dataContract, Type declaredType)
   at System.Runtime.Serialization.XmlObjectSerializerContext.IsKnownType(DataContract dataContract, Dictionary`2 knownDataContracts, Type declaredType)
   at System.Runtime.Serialization.KnownTypeDataContractResolver.TryResolveType(Type type, Type declaredType, DataContractResolver knownTypeResolver, XmlDictionaryString&amp; typeName, XmlDictionaryString&amp; typeNamespace)
   at Microsoft.Xrm.Sdk.KnownTypesResolver.TryResolveType(Type type, Type declaredType, DataContractResolver knownTypeResolver, XmlDictionaryString&amp; typeName, XmlDictionaryString&amp; typeNamespace)
   at System.Runtime.Serialization.XmlObjectSerializerWriteContext.ResolveType(Type objectType, Type declaredType, XmlDictionaryString&amp; typeName, XmlDictionaryString&amp; typeNamespace)
   at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteTypeInfo(XmlWriterDelegator writer, DataContract contract, DataContract declaredContract)
   at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithXsiTypeAtTopLevel(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle originalDeclaredTypeHandle, Type graphType)
   at System.Runtime.Serialization.DataContractSerializer.InternalWriteObjectContent(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
   at System.Runtime.Serialization.DataContractSerializer.InternalWriteObject(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
   at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
   at System.Runtime.Serialization.XmlObjectSerializer.WriteObject(XmlDictionaryWriter writer, Object graph)
   at System.Runtime.Serialization.XmlObjectSerializer.WriteObject(Stream stream, Object graph)
   at Microsoft.Crm.Extensibility.InprocessServiceProxy.ConvertToLateBound[T](Object o)
   at Microsoft.Crm.Extensibility.InprocessServiceProxy.ExecuteCore(OrganizationRequest request)
   at Microsoft.Dynamics.Solution.Common.PriceService.PricingDecimalPrecisionFromMetadata()
   at Microsoft.Dynamics.Solution.Common.PriceService.CalculatePriceInternal(Entity entity, Guid lineItemId, Boolean skipQOIDetailPricing, Boolean overridePricePerUnitLock, Boolean overrideDiscountLock, IPluginContext context)
   at Microsoft.Dynamics.Solution.Common.PriceService.&lt;&gt;c__DisplayClass28_0.&lt;CalculatePrice&gt;b__0()
   at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action, IEnumerable`1 additionalCustomProperties)
   at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
   at Microsoft.Dynamics.Solution.Common.PluginInternalLogger.Execute(XrmTelemetryActivityType activityType, Action action)
   at Microsoft.Dynamics.Solution.Common.PriceService.CalculatePrice(Entity entity, Guid lineItemId, Boolean skipQOIDetailPricing, Boolean overridePricePerUnitLock, Boolean overrideDiscountLock, IPluginContext context)
   at Microsoft.Crm.Sales.ObjectModel.QOIPriceService.CalculatePrice(Guid qoiId, Guid lineItemId, Boolean skipLineItemPricing, Boolean overridePricePerUnitLock, Boolean overrideDiscountLock, Boolean isModifiedBySystem, IPluginContext context)
   at Microsoft.Crm.Sales.ObjectModel.InvoiceService.CalculatePrice(Guid qoiId, Guid qoiDetailId, Boolean skipQOIDetailPricing, Boolean overridePricePerUnitLock, Boolean overrideDiscountLock, Boolean isModifiedBySystem, PriceCalculationSettings priceSettings, IPluginContext context)
   at Microsoft.Crm.Sales.ObjectModel.CalculatePriceService.DoCalculatePriceInternal(EntityReference entityRef, EntityReference parentRef, QOIService qoiService, PriceCalculationSettings priceSettings, IPluginContext context)
   at Microsoft.Crm.Sales.ObjectModel.CalculatePriceService.CalculatePrice(EntityReference entityRef, EntityReference parentId, QOIService qoiService, IPluginContext context)
   at Microsoft.Dynamics.Sales.Plugins.PreOperationInvoiceRetrieve.ExecuteCrmPlugin(LocalPluginContext localContext)
   at Microsoft.Dynamics.Solution.Common.PluginBase.Execute(IServiceProvider serviceProvider)
   at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
   at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #483565AB</Message>
    <Timestamp>2024-02-28T22:58:50.9096023Z</Timestamp>
    <ExceptionRetriable>false</ExceptionRetriable>
    <ExceptionSource i:nil=/true/ />
    <InnerFault>
      <ActivityId>773e1f4d-546c-420c-90f9-0fdf74856b35</ActivityId>
      <ErrorCode>-2147220970</ErrorCode>
      <ErrorDetails xmlns:d4p1=/http://schemas.datacontract.org/2004/07/System.Collections.Generic/ />
      <HelpLink i:nil=/true/ />
      <Message>System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM//Software//Microsoft//Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM//Software//Microsoft//Fusion!EnableLog].
: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #8ECDF8E4</Message>
      <Timestamp>2024-02-28T22:58:50.9096023Z</Timestamp>
      <ExceptionRetriable>false</ExceptionRetriable>
      <ExceptionSource i:nil=/true/ />
      <InnerFault i:nil=/true/ />
      <OriginalException i:nil=/true/ />
      <TraceText i:nil=/true/ />
    </InnerFault>
    <OriginalException i:nil=/true/ />
    <TraceText i:nil=/true/ />
  </InnerFault>
  <OriginalException i:nil=/true/ />
  <TraceText>
[Microsoft.Dynamics.Sales.Plugins: Microsoft.Dynamics.Sales.Plugins.PreOperationInvoiceRetrieve]
[70e7e718-6f68-e611-80ed-00155d36100d: Retrieve of invoice]
Entered Microsoft.Dynamics.Sales.Plugins.AddressComputationOnReadPrePlugin.Execute(), Correlation Id: ab01e4b6-6191-4d3c-813a-18f6dc197c44, Initiating User: 18cc78a1-9a24-df11-afb6-00505691068c
Exiting Microsoft.Dynamics.Sales.Plugins.AddressComputationOnReadPrePlugin.Execute(), Correlation Id: ab01e4b6-6191-4d3c-813a-18f6dc197c44, Initiating User: 18cc78a1-9a24-df11-afb6-00505691068c
Entered Microsoft.Dynamics.Sales.Plugins.PreOperationInvoiceRetrieve.Execute(), Correlation Id: ab01e4b6-6191-4d3c-813a-18f6dc197c44, Initiating User: 18cc78a1-9a24-df11-afb6-00505691068c
Exiting Microsoft.Dynamics.Sales.Plugins.PreOperationInvoiceRetrieve.Execute(), Correlation Id: ab01e4b6-6191-4d3c-813a-18f6dc197c44, Initiating User: 18cc78a1-9a24-df11-afb6-00505691068c
</TraceText>
</OrganizationServiceFault>
  • Verified answer
    Evgenich Profile Picture
    Evgenich 80 on at
    Microsoft.Xrm.Sdk.Organisation service Fault
    Thank you. Solved this easier by moving Newtonsoft json dll to Tools folder and restarting server
  • Suggested answer
    Pradeep Rai Profile Picture
    Pradeep Rai 5,490 Super User 2024 Season 2 on at
    Microsoft.Xrm.Sdk.Organisation service Fault

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,277 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,126 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans