When receiving large AS2 transmissions from my partners, any transmission of a payload greater than 30 MB that is not sent via Chunked-Transfer-Encoding is rejected with an error at the web server:
413 “Request Entity Too Large”
I can see that the web.config for Arc is set up to accept large payloads:
<!-- This allows very large, slow requests to be processed. -->
<httpRuntime maxRequestLength="2097151" executionTimeout="21600" requestValidationMode="2.0" enableVersionHeader="false" />
So why is the server rejecting the request?
Cause: Ordinarily, AS2 agents that support Chunked-Transfer-Encoding will apply this on payloads that exceed a given limit for more efficient transfers. Because Chunked-Transfer-Encoding requests are sent and processed in chunks, there is no size limit on the payload that can be transferred, and both client and server will process the transmission in pieces, making this the ideal way to handle large transfers.
However, those that do not or cannot support Chunked-Transfer-Encoding (it is an optional profile in AS2, so not all user-agents are capable of supporting it) will attempt to send the payload in one large chunk, and many web servers will block requests above a certain size to avoid lengthy processing errors.
IIS has a separate Request Filtering module that can intercept the request before it arrives at the application that defaults to 30 MB of post data.
Resolution: If you’re hosting the application in IIS, you can see this because of the Request Filtering module in IIS for the site.
Please find the web site or virtual application pool in IIS, and look for the Request Filtering module:
In there, select the Edit Feature settings in the right, and you'll see a Maximum Allowed Content Length:
Please set this to a higher value to allow larger request to be received at the server.