3

I am connecting to a WCF based webservice. For certain methods, the input contains a list of objects/structures. When the number of items in this list increases beyond a certain number, the service fails with HTTP/1.1 400 Bad Request when I try to test the same using SOAPUI. I tried changing the web.config file with the following changes:

<httpRuntime maxRequestLength="2097151" /> <binding name="basicHTTP" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:01:00" sendTimeout="00:01:00" maxReceivedMessageSize="4194304" maxBufferSize="98547" maxBufferPoolSize="258547"> <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> </binding> 

2 Answers 2

3

The issue was solved by the maxReceivedMessageSize setting. Initially in my binding, I did not set the bindingConfiguration explicitly, though the basicHttpBinding was declared and set.

As such changes in maxReceivedMessageSize in the binding was not getting applied and the default setting of 64kb was active. I have set the bindings like:

<endpoint address="" binding="basicHttpBinding" bindingConfiguration="basicHttpBinding" name="AMS" bindingName="basicHttpBinding" contract="Entity.AccuchekMobility.Service.IAccuchekMobilityService" /> <binding name="basicHttpBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:02:00" sendTimeout="00:01:00" maxReceivedMessageSize="4194304" maxBufferPoolSize="524288" maxBufferSize="4194304"> 
Sign up to request clarification or add additional context in comments.

Comments

2

Be aware that maxReceivedMessageSize is in Bytes whereas maxRequestLength is in KiloBytes. Also for buffered transfer set the buffer size to the same value as max message size. How large is the failing input?

2 Comments

The failing request is hardly few kB. It is far below 1 MB, I however shall update the exact size later.
So, may I expect some more guidance please?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.