0

我收到了 maxStringCount is exceeded 错误,并且已经阅读了大量有关解决问题的内容(也就是说,如果您使用的是 http 绑定)。

对我来说有问题,我正在使用 netTcpBinding。所以我不知道在 bindingConfiguration 中放什么。这是我的 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>

有任何想法吗?

谢谢,

杰森

4

1 回答 1

2

你的意思是 maxStringContentLength 吗?如果是这样,您可以在为其他绑定所做的配置文件的同一部分中设置它 - 在 Binding 部分的 ReaderQuotas 部分中。IE:

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

如果你的意思是别的,你能提供更多的细节吗?

于 2011-07-01T03:29:06.343 回答