SBX - Search With Button

SBX - Forum Post Title

"The size necessary to buffer the XML content exceeded the buffer quota" Error when calling Organization.svc.CREATE()

Microsoft Dynamics CRM Forum

Rolando R asked a question on 24 May 2019 3:39 PM

Question Status

Suggested Answer

Hello,

I am using Microsoft.Crm.Sdk.Proxy (v9.0.0.0) and Microsoft.Xrm.Sdk (v9.0.0.0) assemblies from a custom .NET application we built that requests CRUD type operations to the CRM Dynamics 365 instance. This error only happens when I call the Microsoft.Xrm.Sdk.IOrganizationService.Create() method (i.e. update works fine). This is only happening on our UAT instance, in PROD, it is running fine. Both are running latest versions (v9.x).

Is there a setting or config in the UAT instance that could possibly be causing this issue? It seems like all of a sudden it just started doing this.

Any ideas/suggestions would be awesome! thanks!

Error Message:

The size necessary to buffer the XML content exceeded the buffer quota.

Stack Trace:

Server stack trace:

   at System.Runtime.BufferedOutputStream.WriteCore(Byte[] buffer, Int32 offset, Int32 size)

   at System.Runtime.BufferedOutputStream.Write(Byte[] buffer, Int32 offset, Int32 size)

   at System.Xml.XmlBinaryNodeWriter.FlushBuffer()

   at System.Xml.XmlStreamNodeWriter.UnsafeWriteUTF8Chars(Char* chars, Int32 charCount)

   at System.Xml.XmlBinaryNodeWriter.UnsafeWriteText(Char* chars, Int32 charCount)

   at System.Xml.XmlBinaryNodeWriter.WriteText(Char[] chars, Int32 offset, Int32 count)

   at System.Xml.XmlBinaryNodeWriter.WriteEscapedText(Char[] chars, Int32 offset, Int32 count)

   at System.Xml.XmlBaseWriter.WriteChars(Char[] chars, Int32 offset, Int32 count)

   at System.Xml.XmlBinaryWriter.WriteTextNode(XmlDictionaryReader reader, Boolean attribute)

   at System.Xml.XmlDictionaryWriter.WriteNode(XmlDictionaryReader reader, Boolean defattr)

   at System.ServiceModel.Channels.ReceivedFault.CreateFault12Driver(XmlDictionaryReader reader, Int32 maxBufferSize, EnvelopeVersion version)

   at System.ServiceModel.Channels.MessageFault.CreateFault(Message message, Int32 maxBufferSize)

   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)

   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)

   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)

   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

 

Exception rethrown at [0]:

   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)

   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

   at Microsoft.Xrm.Sdk.IOrganizationService.Create(Entity entity)

   at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.CreateCore(Entity entity)

   at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.Create(Entity entity)

   at LifeMarkProxy.EntityHelper.CreateProfile(IOrganizationService service, Claim[] claimsIdentity) in 

Reply
Rolando R responded on 24 May 2019 4:22 PM
Suggested Answer

I read a post where some user was having the same error, and they disabled a workflow and the error stopped displaying.

And so, got the idea to do the same.

Since I was only getting this error in UAT, we pulled up and compared all of the workflows in UAT and PROD that were triggered on CREATE.

Low and behold, there were more workflows in UAT than in PROD, and so deactivated the different workflows, ensured it was the same as PROD and the error went away.

We're back in business! :)

Reply
Rolando R responded on 24 May 2019 4:22 PM
Suggested Answer

I read a post where some user was having the same error, and they disabled a workflow and the error stopped displaying.

And so, got the idea to do the same.

Since I was only getting this error in UAT, we pulled up and compared all of the workflows in UAT and PROD that were triggered on CREATE.

Low and behold, there were more workflows in UAT than in PROD, and so deactivated the different workflows, ensured it was the same as PROD and the error went away.

We're back in business! :)

Reply

SBX - Two Col Forum

SBX - Migrated JS