title: The maximum nametable character count quota (16384) has been exceeded while reading XML data error when number of service operations exceed 75
body: <p>We are using NetTCPbinding in WCF in our project. Recently, as the number of service operations increased beyond 75, we are facing this error while starting our service. </p>
  
  <blockquote>
    <p>There is an error in the XML document.<br>
    The maximum nametable character count quota (16384) has been exceeded while reading XML data. The nametable is a data structure used to store strings encountered during XML processing - long XML documents with non-repeating element names, attribute names and attribute values may trigger this quota. This quota may be increased by changing the MaxNameTableCharCount property on the XmlDictionaryReaderQuotas object used when creating the XML reader.</p>
  </blockquote>
  
  <p>As suggested in this error message, we have increased the quota on <code>MaxNameTableCharCount</code> property, but it is not solving our issue.</p>
  
  <p>Our team have also followed the solutions given in the links below. But, none of these is working for us.</p>
  
  <p><a href="https://stackoverflow.com/questions/2765598/wcf-the-maximum-nametable-character-count-quota-16384-has-been-exceeded-whil">WCF - The maximum nametable character count quota (16384) has been exceeded while reading XML data</a></p>
  
  <p><a href="http://geekswithblogs.net/claraoscura/archive/2007/08/20/114806.aspx" rel="nofollow noreferrer">http://geekswithblogs.net/claraoscura/archive/2007/08/20/114806.aspx</a></p>
  
  <p><a href="http://mnairooz.blogspot.in/2010/06/maximum-nametable-character-count-quota.html" rel="nofollow noreferrer">http://mnairooz.blogspot.in/2010/06/maximum-nametable-character-count-quota.html</a> </p>
  
  <p>Please find below our app.config on server side</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
    &lt;system.web&gt;
      &lt;compilation debug="true"/&gt;
    &lt;/system.web&gt;
    &lt;system.serviceModel&gt;
      &lt;services&gt;
        &lt;service behaviorConfiguration="Test.ServiceLibraryHost.ServiceBehavior"
                 name="Test.ServiceLibraryHost.TestService"&gt;
          &lt;endpoint address="" binding="netTcpBinding" bindingConfiguration="myNetTcpBinding" contract="Test.ServiceLibraryHost.ITestService"&gt;
            &lt;identity&gt;
              &lt;dns value="localhost"/&gt;
            &lt;/identity&gt;
          &lt;/endpoint&gt;
          &lt;endpoint address="mex" binding="mexTcpBinding" bindingConfiguration="" contract="IMetadataExchange"/&gt;
          &lt;host&gt;
            &lt;baseAddresses&gt;
              &lt;add baseAddress="net.tcp://localhost:8529/TestService"/&gt;
            &lt;/baseAddresses&gt;
          &lt;/host&gt;
        &lt;/service&gt;
      &lt;/services&gt;
      &lt;behaviors&gt;
        &lt;serviceBehaviors&gt;
          &lt;behavior name="Test.ServiceLibraryHost.ServiceBehavior"&gt;
            &lt;serviceMetadata /&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
      &lt;/behaviors&gt;
      &lt;bindings&gt;
        &lt;netTcpBinding&gt;
          &lt;binding name="myNetTcpBinding"&gt;
            &lt;readerQuotas maxDepth="32" maxStringContentLength="21745878" maxArrayLength="21745878"
                maxBytesPerRead="21745878" maxNameTableCharCount="21745878" /&gt;
          &lt;/binding&gt;
        &lt;/netTcpBinding&gt;
      &lt;/bindings&gt;
    &lt;/system.serviceModel&gt;
    &lt;startup&gt;
      &lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/&gt;
    &lt;/startup&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Any help, in this case, would be highly appreciated. Let me know in case you need any more information. Thank you.</p>