Le maximum de la chaîne de la longueur du contenu de quota (8192) a été dépassé lors de la lecture de données XML

Je suis en train de passer une chaîne de grande taille (de 24 000 à 50 000 caractères) pour une auto-hébergé TCP service WCF.

J'ai haussé le maxStringContentLength (partout) de 22008192.

J'ai lu quelque part que j'ai besoin de changer la bindingConfiguration à "LargeBuffer" ou "LongFields" mais quand je fais ceci:

<endpoint address="" binding="netTcpBinding" bindingConfiguration="LongFields"
  contract="ExStreamWCF.IService1">

ou ceci:

<endpoint address="" binding="netTcpBinding" bindingConfiguration="LargeBuffer"
  contract="ExStreamWCF.IService1">

Mon service ne démarre pas. J'ai vraiment besoin de cette erreur de s'en aller. Des idées?

Merci,

Jason

PS -- fichier de configuration du service tcp sur le serveur:

<system.serviceModel>
<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>
</services>
<behaviors>
  <serviceBehaviors>
    <behavior name="ExStreamWCF.Service1Behavior">
      <serviceMetadata httpGetEnabled="false" />
      <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>
  </serviceBehaviors>
</behaviors>

EDIT: Liaisons demandé

    <system.serviceModel>
    <bindings>
<netTcpBinding>
<binding name="NetTcpBinding_IService1" closeTimeout="00:01:00"
 openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
 transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
 hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="524288"
 maxBufferSize="2565536" maxConnections="10" maxReceivedMessageSize="2565536">
 <readerQuotas maxDepth="22008192" maxStringContentLength="22008192" maxArrayLength="2516384"
  maxBytesPerRead="22008192" maxNameTableCharCount="22008192" />
 <reliableSession ordered="true" inactivityTimeout="00:10:00"
  enabled="false" />
 <security mode="Transport">
  <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
  <message clientCredentialType="Windows" />
 </security>
</binding>

</netTcpBinding>
</bindings>

Les Points De Terminaison Client:

<client>
<endpoint address="net.tcp://devexstream-2:8080/Service" binding="netTcpBinding"
bindingConfiguration="NetTcpBinding_IService1" contract="TCPService.IService1"
         name="NetTcpBinding_IService1">
<identity>
 <servicePrincipalName value="TCPService\Devexstream-2" />
 <dns value="Devexstream-2.anchorgeneral.local" />
</identity>
</endpoint>

J'ai édité le service (comme suit), mais maintenant, le service ne démarre pas. La nouvelle application.config:

<system.serviceModel>
<bindings>
  <netTcpBinding>
    <binding name="ExStreamWCFBinding" closeTimeout="00:00:05" openTimeout="00:00:05" receiveTimeout="00:00:05" sendTimeout="00:00:05" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparison="StrongWildCard" maxBufferPoolSize="524288" maxBufferSize="524288" maxConnections="10" maxReceivedMessageSize="5242880">
      <readerQuotas maxDepth="32" maxStringContentLength="5242880" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
    </binding>
  </netTcpBinding>
</bindings>
<services>
  <service behaviorConfiguration="ExStreamWCF.Service1Behavior"
    name="ExStreamWCF.Service1">
    <endpoint address="" binding="netTcpBinding" bindingConfiguration="ExStreamWCFBinding"
      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>
</services>
<behaviors>
  <serviceBehaviors>
    <behavior name="ExStreamWCF.Service1Behavior">
      <serviceMetadata httpGetEnabled="false" />
      <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>
  </serviceBehaviors>
</behaviors>

  • Montrez-nous configurations de liaison que vous définissez !
InformationsquelleAutor | 2011-07-06