Reputation: 961
Sorry for the long title.
I am writing a Unit Test framework for Dynamics AX in C# to test an integration project we are working on using the Dynamics Connector.
The basic structure of our timesheet tests is:
On some tests we are experiencing an error message on point 5 which is saying
System.ServiceModel.CommunicationException: The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element. ---> System.ServiceModel.QuotaExceededException: The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.
I have split the message up into two as it sounds like two different errors
TestCleanup method ... threw exception. System.ServiceModel.CommunicationObjectFaultedException: System.ServiceModel.CommunicationObjectFaultedException: The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state
With us using the AIF I can't do the top part because the binding xml is nowhere to be seen (as far as we know)
The strange thing is, this error doesnt seem to come consitently but we are cleaining up everything that we can see on the test.
Can anyone help me? Even if it is just suggesting things to try.
Another thing to note is that these errors quite often cause the dynamics ax service to crash which makes debugging it a complete pain in the backside
Upvotes: 1
Views: 2611
Reputation: 7627
Change the configuration of the AIF port.
You have to change the maxReceivedMessageSize
for the binding.
Example:
<configuration>
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="DefaultServiceGroupBinding"
maxReceivedMessageSize="104857600"
...
/>
</netTcpBinding>
</bindings>
...
<configuration>
Upvotes: 3