Message Too Large to Process Exception

I am getting an error whenever it’s the case that I am leaving a scope where there is an out argument with several megabytes of information stored. This is the case with DataTables as well as when I grab multiple emails with their attachments.

The specific error message I am getting is this:

19.4.4+Branch.support/v2019.4.Sha.6d308c7f5a32b559373887ae421ce7eaec8f8d24

Message: Could not retrieve the result of the job execution. This might be because a message was too large to process.

Exception Type: System.Exception

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.Exception: Could not retrieve the result of the job execution. This might be because a message was too large to process.

The strangest thing is that, if this is run in a long running program with the offending sequence file being used, it will return without throwing an exception and cause weird issues later, making other areas bug out instead.

This is similar to a number of posts already present:


The problem is that all of the information I’m passing is necessary and that I am having to reduce things, store them in files, and then re-read them later on:

For DataTables, writing to excel works as a workaround. However, I have had issues saving and reloading datetimes as Excel wants to format them even when it’s the case that I save them as type String.

For emails, I have noticed that reducing the number saved has worked, such as only requesting them one at a time in GetTransactionData and going until the inbox is empty.

This thread’s answer stated that it has to do with the WCF Message Size Configuration, but that did not appear to work for me.