Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: WCF service
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





maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />



 
and here is my client web.config file




bindingConfiguration="BasicHttpBinding_ThePTSearchServiceI"
contract="WCFRef.ThePTSearchServiceI" name="BasicHttpBinding_ThePTSearchServiceI" />






<!--



-->
<!--

name="BasicHttpBinding_ThePTSearchServiceI">

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

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

-->



 
idon't know why this error was occure
Posted 14-Apr-13 21:30pm
Comments
Naz_Firdouse at 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
ryanb31 at 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.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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"
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

please set you webconfig setting like below, its work for me like charm.
 
<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>
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 250
1 Jochen Arndt 155
2 PIEBALDconsult 150
3 DamithSL 125
4 Afzaal Ahmad Zeeshan 120
0 OriginalGriff 5,695
1 DamithSL 4,591
2 Maciej Los 4,012
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,190


Advertise | Privacy | Mobile
Web04 | 2.8.141220.1 | Last Updated 2 Jul 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100