Skip to main content
Dynamics 365
  • 1 min read

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 the Endpoint Behaviors folder
Configuring the advanced endpoint behaviors.
  1. In the window pan, click New Endpoint Behavior Configuration
  2. Select the new configuration you just created, and in the window pane, click Add… Select dataContractSerializer and then click Add
New endpoint behavior configuration.
  1. Double-click the dataContractSerializer you just added, and change MaxItemsInObjectGraph to a larger number
  2. Back in the Configuration folder tree, and expand Client > Endpoints
  3. Select the DefaultServiceGroupEndPoint
  4. In the Client Endpoint form pane, set BehaviorConfiguration to the configuration you created in steps 7-9.
a screenshot of a cell phone
  1. Close out of the Configure Services window and save those changes
  2. Activate your service and test again

Get started with Dynamics 365

Drive more efficiency, reduce costs, and create a hyperconnected business that links people, data, and processes across your organization—enabling every team to quickly adapt and innovate.