Tag Archives: Mex

Update Service Reference then get error – The maximum nametable character count quota (16384) has been exceeded while reading XML data.

If you have WCF and trying to update service reference via Visual Studio then right away get error message saying that “The maximum nametable character count quota (16384) has been exceeded while reading XML data”, this means your service becomes too big.

This was just because of the service grows too big and exceed the maximum size that default setting examined. So we have to expand the limitation of size of Visual Studio so we can update service through Visual Studio as usual again.

1. Go to C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE (up to the version you are using, mine is Visual Studio 2010).

2. Find devenv.exe.config and open to edit it with Administrator right, thus the editor must be opened as Administrator. Otherwise you won’t be able to save change.

3. Add below config for service model then save it.



 <endpoint binding="netTcpBinding" bindingConfiguration="GenericBinding" contract="IMetadataExchange" name="net.tcp" />




 <binding name="GenericBinding"

 maxBufferPoolSize="2147483647" maxBufferSize="2147483647"


 <readerQuotas maxDepth="2147483647"




 maxNameTableCharCount="2147483647" />

 <security mode="None" />





Note that line 3, 6 and 17 are up to the protocol that you are using.

4. Restart Visual Studio if opening.

Done. You should be able to update service via Visual Studio now.

Tagged , , , , ,