Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am having a WCF REST Service. I am getting above mentioned error when my data.length is exceeding bytes more than 64931 approximately. Find my web.config as below

<system.serviceModel>

<bindings>

<webHttpBinding>

<binding name="webHttpBinding" crossDomainScriptAccessEnabled="true" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" transferMode="Streamed">

<readerQuotas maxDepth="2000000000" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />

<security mode="Transport">
<transport clientCredentialType="None" />
</security>

</binding>

</webHttpBinding>

</bindings>

<services>
      <service name="My_Service.MyApp" >

<endpoint address="" binding="webHttpBinding" contract="My_Service.MyApp" behaviorConfiguration="web" >
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <host>

 </host>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior>
<serviceMetadata httpGetEnabled="True"/>

<serviceDebug includeExceptionDetailInFaults="True" />
        </behavior>
      </serviceBehaviors>
    
<endpointBehaviors>
        <behavior name="web">
          <webHttp />
        </behavior>
</endpointBehaviors>
    </behaviors>
  
  </system.serviceModel>



Both API and Client are on same machine.

Kindly review and suggest the solution. Also let me know if any other info needed.

What I have tried:

I have added additional bindings settings like maxBufferSize etc as suggested on google.
Posted
Updated 18-Oct-19 2:22am
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900