Click here to Skip to main content
15,891,316 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a silverlight app (non asp) and wcf service.

When i read large data from the wcf service 60k+ then the silverlight app successfully retrieves the information from the wcf service.
However....
When i try to send (silverlight client to wcf service) large data 30k+ I get the XmlDictionaryReaderQuotas error but when I send 2k information then everything works fine.

This is my ServiceReferences.ClientConfig file
XML
<system.serviceModel>
        <bindings>
            <basicHttpBinding>
                <binding name="BasicHttpBinding_IService1" maxBufferSize="2147483647"
                    maxReceivedMessageSize="2147483647">
                    <security mode="None" />
                </binding>
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://localhost:1320/Service1.svc"
                binding="basicHttpBinding"
                bindingConfiguration="BasicHttpBinding_IService1"
                contract="ServiceReference1.IService1"
                name="LargeBuffer" />
        </client>
    </system.serviceModel>






And this is my wcf service app.config file....
XML
<system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="LargeBuffer" closeTimeout="00:01:00"
          openTimeout="00:01:00"
          receiveTimeout="00:10:00"
          sendTimeout="00:01:00"
          transferMode="Buffered"
          maxReceivedMessageSize="73400320" >
          <!--70MB-->
          <readerQuotas maxArrayLength="73400320" />
        </binding>
      </basicHttpBinding>
    </bindings>
    <services />
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="true"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  <

/system.serviceModel
Posted
Updated 10-Oct-10 0:37am
v2

1 solution

Have a look at this thread, it mentions some other settings to make to handle the larger data lengths.

http://social.msdn.microsoft.com/forums/en-US/wcf/thread/da9b5252-de00-498d-b6b7-d256de47b8c6[^]
 
Share this answer
 
Comments
Serenity1 10-Oct-10 9:01am    
Tried there suggestion about the reader quote but I can only place the <readerquotas> into the wcf server app.config file but when i place it into theServiceReferences.ClientConfig i get a Invalid child element.

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