Max request length exceeded

1k views Asked by At

I have a user receiving the following error in response to an ItemQueryRq with the QuickBooks Web Connector and IIS 7.

Version: 1.6

Message: ReceiveResponseXML failed

Description: QBWC1042: ReceiveResponseXML failed Error message: There was an exception running the extensions specified in the config file. --> Maximum request length exceeded. See QWCLog for more details. Remember to turn logging on.

The log shows the prior request to be

QBWebConnector.SOAPWebService.ProcessRequestXML() : Response received from QuickBooks: size (bytes) = 3048763

In IIS 7, the max allowed content length is set to 30000000, so I'm not sure what I need to change to allow this response through. Can someone point me in the right direction?

2

There are 2 answers

3
Keith Palmer Jr. On

Chances are, your web server is rejecting the Web Connector's HTTP request because you're trying to POST too much data to it. It's tough to tell for sure though, because it doesn't look like you have the Web Connector in VERBOSE mode, and you didn't really post enough of the log to be able to see the rest of what happened, and you didn't post the ItemQuery request you sent or an idea of how many items you're getting back in the response.

If I had to guess, you're sending a very generic ItemQueryRq to try to fetch ALL items, which has a high likelihood of returning A LOT of data, and thus having IIS reject the HTTP request.

Whenever you're fetching a large amount of data using the Web Connector, you should be using iterators. Iterators allow you to break up the result set into smaller chunks.

0
Alexey Gurevski On

If you just need to determine if an item exists in QB you can simply add IncludeRetElement to your ItemQuery

So you should post something like

<ItemQueryRq requestID="55">        
<FullName>Prepay Discount</FullName>        
<IncludeRetElement>ListID</IncludeRetElement>      
</ItemQueryRq>

And in Item query response just check the status code. If it is equal to 500 then it means that you should push your item into QB, if it is equal to 0 then it means that item exists

That workaround will save plenty of bytes in your response