1

I'm getting the maxStringCount is exceeded error, and have read a ton on fixing the issue (that is, if you're using http bindings).

Problem for me, I'm using netTcpBinding. So I have no idea what to put in bindingConfiguration.. Here's my app.config:

<services>
  <service behaviorConfiguration="ExStreamWCF.Service1Behavior"
    name="ExStreamWCF.Service1">
    <endpoint address="" binding="netTcpBinding" bindingConfiguration=""
      contract="ExStreamWCF.IService1">
      <identity>
        <dns value="Devexstream-2.anchorgeneral.local" />
        <!--<dns value="vmwin2k3sta-tn2" />-->
      </identity>
    </endpoint>
    <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration=""
      contract="IMetadataExchange" />
    <host>
      <baseAddresses>
        <add baseAddress="net.tcp://Devexstream-2:8080/Service" />
        <!--<add baseAddress="net.tcp://vmwin2k3sta-tn2:8080/Service" />-->
      </baseAddresses>
    </host>
  </service>

Any ideas?

Thanks,

Jason

1 Answers1

2

Do you mean maxStringContentLength? If so, you set that in the same section of the config file you do for other bindings - in the ReaderQuotas section of the Binding section. I.e.:

<Bindings>
  <netTcpBinding>
    <binding name=".....>
      <readerQuotas maxStringContentLength="8192" .... />
    </binding>
  </netTcpBinding>
</Bindings>

If you mean something else, can you provide some more details?

Tim
  • 28,212
  • 8
  • 63
  • 76
  • If you don't specify the name attribute the binding will be applied to all netTcpBindings. Less hassle :) – flayn Jul 01 '11 at 08:18
  • True...I didn't add the attributes on the binding and readerQuotas elements because they weren't central to the example I was giving - I was simply showing where the maxStringContentLength attribute was set in the config file. – Tim Jul 01 '11 at 09:11
  • 1
    I think your answer is spot on and I up-voted it. I just wanted to point out that the name attribute is not always required. – flayn Jul 01 '11 at 11:16