Linx Main Linx Help

Getting past size limitations on REST Services

We’ve been receiving some issues with size limitation on Web Services. Two specific scenarios:

  • Receiving Large requests
  • Sending Large responses

Errors that were received included “413 (Request Entity Too Large)” or “Response over configured buffer size”.

To fix this, there are 3 sets of configurations that needs to be done. The first is to solve the 413 error, and that is to configure the computer itself to receive larger files. This post explains the steps:

or you can just use this in CMD.exe:

C:\Windows\SysWOW64\inetsrv\appcmd.exe set config -section:system.webServer/serverRuntime /uploadReadAheadSize:“20480000” /commit:apphost

And also, there’s some configurations you can set in the “C:\Program Files (x86)\Twenty57 Linx 5\bin\Twenty57.Linx.Server.Core.exe.config”:

You’ll need to play with the numbers a bit.

   <add key="WebServerPort" value="8022"/>
   <add key="WCFSendTimeoutSeconds" value="60" />
   <add key="WCFReceiveTimeoutSeconds" value="600" />
   <add key="WCFMaxReceivedMessageSizeBytes" value="20485760" />
   <add key="WCFMaxStringContentLengthCharacters" value="2000000" />
   <add key="WCFMaxFaultSizeBytes" value="128536" />

Lastly, the RESTWebService component has got some settings one can set (Check the help of the control):