'What is causing my ActiveReports report to fail when large string values are returned from the stored procedure?

I'm getting an error in ActiveReports (v. 12) when I return a large string from a stored procedure.

I'm calling one stored procedure in the DataInitialize function and another in the Detail_Format function. The stored procedure in the Detail_Format is returning several large strings in the instance where it is erroring out. These are the length totals, with 32,054 characters being the largest in terms of characters being returned from the stored procedure:

1,565 4,060 1,876 4,051 2,864 2,352 17,208 17,144 17,326 11,876
20,446 24,266 15,560 32,029 31,705 17,624 25,933 10,721 32,054 1,158

I'm filling the SectionReportModel.TextBox fields by setting each of their Text properties to the value returned in the DataRowCollection object that returns the result from my stored procedure.

GrapeCity's documentation states that MaxLength's default value is 32,767, which is slightly greater than the largest string length that is returned from my stored procedure.

I'm getting the below error:

System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host

The stored procedure runs very efficiently, so that's not the issue. I only get this error when the values being returned are extremely large.

Any ideas on what I can do to get this to work?

1/28/22 UPDATE:

I'm wondering if this is just a matter of setting maxRequestLength in the config file. This is not set currently (so it should have a default value of 4,096 bytes). The stored procedure is trying to return just upwards of 299,000 bytes to the client.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source