Skip to main content
Solved

API error "Form key or value length limit 2048 exceeded"

  • December 19, 2024
  • 3 replies
  • 223 views

I am calling a REST API and receiving the error “Form key or value length limit 2048 exceeded”.

The body of the request is about 75KB.

This seems to be controlled by a setting in IIS. Is there anything I can do to get around this?

 

Best answer by jinin

Hi ​@michael pearson ,

Could you please try adjusting the web.config file to modify the request limit?

<requestLimits maxQueryString="20480" maxAllowedContentLength="104857600" />

3 replies

jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • Answer
  • December 19, 2024

Hi ​@michael pearson ,

Could you please try adjusting the web.config file to modify the request limit?

<requestLimits maxQueryString="20480" maxAllowedContentLength="104857600" />


  • Author
  • Freshman II
  • December 19, 2024

My instance is Acumatica hosted SaaS.

I suppose I will have to contact Acumatica support to do this.


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • December 19, 2024

Sure, ​@michael pearson 

 If your request retrieves a large number of records, split the request into smaller chunks using $skip and $top.

Example - entity/Default/22.200.001/Customer?$top=10&$skip=0