I have been looking around and checked several answers but I still keep running into the same problem.
I have a WCF-service which receives data as JSON and then processes it. I have a console-application which calls this service. But I keep running into the same problem: 'The remote server returned an unexpected response: (413) Request Entity Too Large.
In my console-application config I have :
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IPaymentBehaviorService" allowCookies="true"
maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" maxBufferPoolSize="2147483647">
<readerQuotas maxDepth="32" maxArrayLength="2147483647" maxStringContentLength="2147483647"/>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:50068/PaymentBehaviorService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IPaymentBehaviorService"
contract="PaymentBehaviorServiceService.IPaymentBehaviorService"
name="BasicHttpBinding_IPaymentBehaviorService" />
</client>
</system.serviceModel>
My server-config :
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
One line in the data that is being sent, looks like :
{ \"ReqId\":\"79\",\"TaxNbr\":\"889638963\",\"Amount\":\"29,4\",\"Invoice\":\"10/2330\",\"InvDate\":\"19/04/2018 0:00:00\",\"ExpDate\":\"19/04/2018 0:00:00\" }
I can only send about 450 of those lines in one request. I need to raise that number of lines to something like 1500 or even more. How can I do that?
I have found a lot of similar questions but none that gave me a solution.