Microsoft Dynamics AX Support

This blog contains posts by the Microsoft Dynamics AX Support Teams Worldwide

Requesting large packages across AX AIF can result in timeout errors after 30 seconds regardless of your timeout values

A common time out exception you may experience with NetTcp AIF calls in AX is:

The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was ’01:09:59.9770000′.

This error can be deceptive as it doesn’t relate to actual timeout values but instead to the size of the ObjectGraph coming across through WCF.  The workaround for this issue is to either break up your packages by sending multiple smaller requests, recommended, or by increasing the size of the MaxItemsInObjectGraph behavior parameter.  Below are steps for increasing the object graph size for an AIF Inbound port service.

  1. Open the AX client
  2. Open the System Administration > Setup > Services and Application Integration Framework >  Inbound Ports window
  3. Deactivate your service
  4. Click on the Configure button next to your adapter
  5. Expand the Advanced folder
  6. Click on the Endpoint Behaviors folder

  7. In the window pane, click New Endpoint Behavior Configuration
  8. Select the new configuration you just created, and in the window pane, click Add… Select dataContractSerializer and then click Add

  9. Double-click the dataContractSerializer you just added, and change MaxItemsInObjectGraph to a larger number
  10. Back in the Configuration folder tree, and expand Client > Endpoints
  11. Select the DefaultServiceGroupEndPoint
  12. In the Client Endpoint form pane, set BehaviorConfiguration to the configuration you created in steps 7-9.

  13. Close out of the Configure Services window and save those changes
  14. Activate your service and test again