0

I have a WCF web services which keep giving me a 413 response when I post a large JSON request to it, I have added the maximum limit into the web.config but it seems they are ignored, I would like to know is there anything wrong in my web.config?

Here is my web.config

<system.serviceModel>
    <services>
      <service name="myService">
        <endpoint address="http://localhost/myService" binding="webHttpBinding"
          bindingConfiguration="myBinding" name="myService"
          contract="ImyService" />
      </service>
    </services>
    <bindings>
      <webHttpBinding>
        <binding name="myBinding" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" >
          <readerQuotas maxStringContentLength="2147483647" maxArrayLength="2147483647" />
          <security mode="Transport" />
        </binding>
      </webHttpBinding>
    </bindings>
  </system.serviceModel>

Thanks!

EDITED:

I have "solved" the problem, by adding a new binding with name = "", which overwrite the default binding setting, and everything goes fine.

Being said, myBinding is actually being ignored or not bound to my service endpoint... Can anyone figuring out the reason behind??

shole
  • 4,046
  • 2
  • 29
  • 69
  • [Try this](http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/7e0d74d3-ca01-4d36-8ac7-6b2ca03fd383.mspx?mfr=true) – Zafar Mar 12 '15 at 05:00
  • Tried, still not working... – shole Mar 12 '15 at 05:37
  • Do both your client and server binding configs match? – MattC Mar 12 '15 at 09:05
  • I was posting request via Fiddler, and ultimately the client is a mobile client android application, I assume there is no need to set any config on the client side....am I wrong? – shole Mar 12 '15 at 09:10
  • See if either of these help? http://www.allenconway.net/2012/05/creating-wcf-restful-service-and-secure.html http://stackoverflow.com/questions/6483053/how-to-use-wcf-in-android – MattC Mar 12 '15 at 09:34

0 Answers0