Maximum nametable char count exceeded

Posted by doc on Stack Overflow See other posts from Stack Overflow or by doc
Published on 2012-11-10T00:04:28Z Indexed on 2012/11/10 5:00 UTC
Read the original article Hit count: 212

Filed under:
|
|

I'm having issues with the maximum nametable char count quota, I followed a couple of answers here and it solved the problem for a while, but now I'm having the same issue.

My Server side config is as follows:

<system.serviceModel>
      <bindings>
        <netTcpBinding>
          <binding name="GenericBinding" maxBufferPoolSize="2147483647" maxBufferSize="2147483647"
                   maxReceivedMessageSize="2147483647">

            <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"
                          maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
            <security mode="None" />
          </binding>
        </netTcpBinding>
      </bindings>
    <behaviors>
            <serviceBehaviors>
                    <behavior>
                            <serviceMetadata httpGetEnabled="false" />
                            <serviceDebug includeExceptionDetailInFaults="true" />
                            <dataContractSerializer maxItemsInObjectGraph="1000000" />
                    </behavior>
            </serviceBehaviors>
    </behaviors>
    <services>
            <service name="REMWCF.RemWCFSvc">
              <endpoint address="" binding="netTcpBinding" contract="REMWCF.IRemWCFSvc" bindingConfiguration="GenericBinding" />
              <endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange" />
              <host>
                <baseAddresses>
                  <add baseAddress="net.tcp://localhost:9081/RemWCFSvc" />
                </baseAddresses>
              </host>
            </service>
    </services>
  </system.serviceModel>

I also have the same tcp binding on the devenv configuration.

Have I reached the limit of contracts supported? Is there a way to turn off that quota?

EDIT

Error Message:

Error: Cannot obtain Metadata from net.tcp://localhost:9081/RemWCFSvc/mex If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata Exchange Error URI: net.tcp://localhost:9081/RemWCFSvc/mex Metadata contains a reference that cannot be resolved: 'net.tcp://localhost:9081/RemWCFSvc/mex'. There is an error in the XML document. 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.

I'm getting that error when trying to run the WCF (which is hosted in a windows service app).

© Stack Overflow or respective owner

Related posts about .NET

Related posts about wcf