mary jean ligas

mary jean ligas

  • NA
  • 420
  • 196.8k

WCF Server & Client Config System Model

Dec 13 2015 9:58 PM

please help me configuring ng config in WCF that is getting error:

"The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:GetListSwiftFileDownloadResult. The InnerException message was 'Maximum number of items that can be serialized or deserialized in an object graph is '65536'. Change the object graph or increase the MaxItemsInObjectGraph quota. '.  Please see InnerException for more details."

dont know what to do i've been stuck here for almost 3weeks, please help me on this masters..


heres my client App.Config
<system.serviceModel>
    <bindings>
      <wsHttpBinding>
        <binding name="WSHttpBinding_RFEConverterService" closeTimeout="00:10:00"
          openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
          bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
          maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647"
          messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="false"
          allowCookies="false" >
          <readerQuotas maxDepth="32" maxStringContentLength="8192"
            maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <reliableSession ordered="true" inactivityTimeout="00:10:00"
            enabled="false" />
          <security mode="Message">
            <transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
            <message clientCredentialType="Windows" negotiateServiceCredential="True" algorithmSuite="Default" establishSecurityContext="True" />
          </security>
        </binding>
      </wsHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://localhost:64437/RFEConverterService.svc"
        binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_RFEConverterService"
        contract="RFEConverterService.IRFEConverterService" name="WSHttpBinding_RFEConverterService">
        <identity>
          <dns value="localhost" />
        </identity>
      </endpoint>
    </client>
    <behaviors>
      <endpointBehaviors>
        <behavior name="WSHttpBinding_RFEConverterService">
          <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
        </behavior>
      </endpointBehaviors>
    </behaviors>
  </system.serviceModel>


and heres my Web.Config for server:

<system.serviceModel>
  <services>
   <service behaviorConfiguration="RFEConverterService.RFEConverterServiceBehavior" name="RFEConverterService.RFEConverterService">
    <endpoint address="" binding="wsHttpBinding" contract="RFEConverterService.IRFEConverterService" >
     <identity>
      <dns value="localhost"/>
     </identity>
    </endpoint>
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
   </service>
  </services>
  <behaviors>
   <serviceBehaviors>
    <behavior name="RFEConverterService.RFEConverterServiceBehavior">
          <dataContractSerializer maxItemsInObjectGraph="2147483647" />
          <serviceMetadata httpGetEnabled="true"/>
     <serviceDebug includeExceptionDetailInFaults="true"/>
        </behavior>
      </serviceBehaviors>
  </behaviors>
 </system.serviceModel>
 


Answers (4)