Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I got this erro msg wehn trying to upload more than 64kb image byte array using wcf service


i want to solve this out but i can't solve it

Here Is my wcf config file
<bindings>
<wshttpbinding>

<binding name="wsHttp" maxreceivedmessagesize="2147483647" messageencoding="Mtom">
<readerquotas maxdepth="2147483647">
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />




and here is my client web.config file
<system.servicemodel>

<client>
<endpoint address="http://localhost:6198/ThePTSearch.svc" binding="basicHttpBinding">
bindingConfiguration="BasicHttpBinding_ThePTSearchServiceI"
contract="WCFRef.ThePTSearchServiceI" name="BasicHttpBinding_ThePTSearchServiceI" />

<bindings>
<basichttpbinding>
<binding name="BasicHttpBinding_ThePTSearchServiceI" maxreceivedmessagesize="2147483647">


<!--<bindings>
<basichttpbinding>
<binding name="BasicHttpBinding_ThePTSearchServiceI" maxbufferpoolsize="2147483647" maxreceivedmessagesize="2147483647">

-->
<!--<services>
<service>
name="BasicHttpBinding_ThePTSearchServiceI">
<endpoint>
address="http://localhost:6198/ThePTSearch.svc"
contract="WCFRef.ThePTSearchServiceI"
binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_ThePTSearchServiceI" />
<endpoint>
address="http://localhost:6198/ThePTSearch.svc"
contract="WCFRef.ThePTSearchServiceI"
binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_ThePTSearchServiceI" />

-->




idon't know why this error was occure
Posted
Comments
Naz_Firdouse 15-Apr-13 3:19am    
Not sure about the issue because you did not posted the full config file
check these links. They might help you
http://stackoverflow.com/questions/2585256/wcf-service-name-binding-name
http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/a19d463f-833e-42a0-afcc-7d5a47704f7f/
http://stackoverflow.com/questions/15340038/the-remote-server-returned-an-error-413-request-entity-too-large
ZurdoDev 15-Apr-13 15:40pm    
If you google the error you will see lots of suggestions. I had this issue before and can't remember which specific setting to change.

U may add or change the setting in the service web config file .

<bindings>
<wsHttpBinding>
<binding name="CustomWSBindingHttp" maxReceivedMessageSize="2147483647">
<reliableSession enabled="false"/>
</binding>
</wsHttpBinding>
<netTcpBinding>
<binding name="CustomWSBindingTcp">
<reliableSession enabled="true"/>
</binding>
</netTcpBinding>
</bindings>

Note:

U mast need to put maxReceivedMessageSize="2147483647"
 
Share this answer
 
please set you webconfig setting like below, its work for me like charm.

XML
<system.serviceModel>
     <services>
      <service name="RGB2LEDWebService.RGB2LED">
        <endpoint name="http" binding="basicHttpBinding" contract="RGB2LEDWebService.IRGB2LED" />
      </service>
    </services>
    <bindings>
      <basicHttpBinding>
        <binding maxReceivedMessageSize="2147483647" />
      </basicHttpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
         <behavior>
          <dataContractSerializer maxItemsInObjectGraph="2147483647" />
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>

      </serviceBehaviors>
      <endpointBehaviors>
        <behavior>
          <dataContractSerializer maxItemsInObjectGraph="2147483647" />
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <protocolMapping>
      <add binding="basicHttpsBinding" scheme="https" />
    </protocolMapping>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
 
Share this answer
 

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