How to Send Large Amounts of Data to a WCF Service
A project I was working on recently made use of several WCF services, but we were having trouble sending large amounts of data to them (specifically, large integer arrays). We spent days trying to figure out how to resolve the issue, trying every config param imaginable (maxRequestMessageSize, maxItemsInObjectGraph, etc), but to no avail. Finally, at the 11th hour, one of the developers found the problem: IIS 7 was interpreting this large message as a Denial of Service attack and returning a false error message. The solution was to add the following to the web.config files of the affected services:
<system.webServer>Note that the value being used in the maxAllowedContentLength attribute is the maximum integer value and was used only for testing. In practicality, a lower number should be used.
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="2147483647"/>
</requestFiltering>
</security>
</system.webServer>
Comments
What should i do now?
Post a Comment