在正確設置好net.tcp WCF服務併發布到IIS後,客戶端仍是不能引用服務出現以下錯誤:併發
該問題並非MaxNameTableCharCount的設置問題,即使設置一個很大的數字仍是不能正確引用,其實這個問題是因爲VS的環境引發,須要修改一下配置文件:tcp
C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.Config文件,在文件後面增長如下節:spa
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="BindSystem" maxBufferPoolSize="2147483647"
maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="None" />
</binding>
</netTcpBinding>
</bindings>
<client>
<endpoint binding="netTcpBinding" bindingConfiguration="BindSystem"
contract="IMetadataExchange" name="net.tcp" />
</client>
</system.serviceModel> .net
重啓VS,後再次引用成功! blog
原文地址:http://blog.csdn.net/jbnie/article/details/7988839get