You are viewing limited content. For full access, please sign in.

Question

Question

413 Request Entity Too Large - Workflow Web Service API

asked on June 18, 2020

Hi All,

I'm trying to build a proof of concept demo for a prospective client which uses the Workflow REST API to start a workflow instance. I'm passing some parameters into the Workflow, which I have got working fine. However the prospective client also wants to pass documents into the Workflow via the API. According to the following post this is possible using a byte array:

https://answers.laserfiche.com/questions/67459/workflow-web-service-POST-byte-array

However when I send a request with a byte array as a parameter I get an error stating the request was too large to be processed:

Error: 413 Request Entity Too Large
The request is larger than the server is willing or able to process

I've already made the changes advised in this Microsoft article but it doesn't seem to have made a difference:

https://techcommunity.microsoft.com/t5/iis-support-blog/solution-for-request-entity-too-large-error/ba-p/501134

Is this a limitation of Workflow, or is there something else on the server I need to change to make this work?

I've attached my request in case this helps (the file represented by the Base64 string is not confidential by the way!)

Thanks in advance!
Dan

POST Request.txt (128.51 KB)
0 0

Answer

SELECTED ANSWER
replied on June 18, 2020

It's a limitation of the underlying Windows WCF subsystem that Workflow uses. The maximum size is 65KB.

Look in the Laserfiche.Workflow.Web project’s Web.config file and under /configuration/system.serviceModel/bindings add the following:

<webHttpBinding>
    <binding maxReceivedMessageSize="2147483647"></binding>
</webHttpBinding>

where the number is the maximum number of bytes you want to allow per request (2.147 billion is a bit high, something like 200,000 would probably be good enough given that your sample request is 128KB).

Then recycle the app pool for the WF Web service.

4 0
replied on June 18, 2020

Amazing! Thanks Miruna. I've spent hours trying to work that out and you've sorted it in 10 mins! laugh

1 0
replied on June 18, 2020

You're welcome. I have access to the code and bunch of developers to help me sound like I know stuff wink

3 0
replied on October 8, 2020 Show version history

This will update the WCF limitation on the Workflow Web Service. There is another message size limitation (250kb) on the Workflow Service. To update that limit edit the Laserfiche.Workflow.Service.exe.config file.

 <system.serviceModel>
    <bindings>
      <netTcpBinding>
        <binding name="ConfigurationBinding" maxBufferSize="1024000000" maxReceivedMessageSize="1024000000">
          <readerQuotas maxStringContentLength="1024000000" maxArrayLength="1024000000" />
        </binding>
      </netTcpBinding>
    </bindings>
 </system.serviceModel>

 

Update the maxReceivedMessageSize and maxBufferSize attribute.

 

2 0
replied on October 26, 2021

Just in case you cannot find the right file to update, the path for the Laserfiche.Workflow.Web project for me was this:

C:\Program Files\Laserfiche\Laserfiche Workflow\Web\Laserfiche.Workflow.Web

Your system might be a bit different but hopefully is fairly close.

1 0
replied on March 27

Thank you for this! I had to make this change after upgrading to LF Forms 12.

1 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.