I have a Web API project which exposes list of post APIs. These APIs insert into some Dynamics 365 CRM (V9.1.11.26) entities. I have more than 30 entities all works fine. Except one entity, when I try inserting new record (organizationServiceproxed.Create(entity)), I always get this error:
The maximum read depth (32) has been exceeded because XML data being read has more levels of nesting than is allowed by the quota. This quota may be increased by changing the MaxDepth property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 79, position 5267.
InnerException is null
This entity has on create workflow, so I think there is some validation error is thrown but somehow it is not returned to the exception.
I searched this error and I found out that this error is WCF related error to the maxDepth configuration. So how to configure this option in Dynamics CRM or how to fix this error.
I checked the event viewer, CRM traces and no errors.