Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The maximum string content length quota (8192) has been exce
Message
De
10/02/2008 12:08:20
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Web Services
Titre:
The maximum string content length quota (8192) has been exce
Divers
Thread ID:
01291182
Message ID:
01291182
Vues:
48
Hi,
I tried porting old Web service to new WCF service , when sending relative long string I receive error

"The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. "

It was documented that this was DOS protection, my problem is I cannot make to work

Web Service Web.Config
<system.serviceModel>
 <serviceBehaviors>   
    <behavior name="WCFEstimatesBehavior">
     <serviceMetadata httpGetEnabled="true" />
     <serviceDebug includeExceptionDetailInFaults="false" />       
    </behavior>
   </serviceBehaviors>
  </behaviors>
    
  <services>
   <service behaviorConfiguration="WCFEstimatesBehavior" name="WCFEstimates">
    <endpoint address="" binding="wsHttpBinding" contract="IWCFEstimates">
        
     <identity>
      <dns value="localhost" />
     </identity>
    </endpoint>
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
   </service>
  
  </services>
    <bindings>

      <wsHttpBinding>
        <binding            name="WSOrderForService"
              maxReceivedMessageSize="2147483647">

          <readerQuotas
            maxDepth="2147483647"
            maxStringContentLength="2147483647"
            maxArrayLength="2147483647"
            maxBytesPerRead="2147483647"
            maxNameTableCharCount="2147483647" />
        </binding>
        
        
      </wsHttpBinding>
      
    </bindings>
   

  </system.serviceModel>
Client Side App.config
 <system.serviceModel>
    <bindings>
      <wsHttpBinding>
        <binding name="WSHttpBinding_IWCFEstimates" closeTimeout="00:01:00"
            openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
            bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
            maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647"
            messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
            allowCookies="false" >

          <readerQuotas
           maxDepth="2147483647"
           maxStringContentLength="2147483647"
           maxArrayLength="2147483647"
           maxBytesPerRead="2147483647"
           maxNameTableCharCount="2147483647" />
       

          <reliableSession ordered="true" inactivityTimeout="00:10:00"
              enabled="false" />
          <security mode="Message">
            <transport clientCredentialType="Windows" proxyCredentialType="None"
                realm="" />
            <message clientCredentialType="Windows" negotiateServiceCredential="true"
                algorithmSuite="Default" establishSecurityContext="true" />
          </security>
        </binding>              
      </wsHttpBinding>

    </bindings>
    <client>
      <endpoint address="http://jongsvr2/wcf/WCFEstimates.svc" binding="wsHttpBinding"
          bindingConfiguration="WSHttpBinding_IWCFEstimates" contract="WCFEstimates.IWCFEstimates"
          name="WSHttpBinding_IWCFEstimates" >
        <identity>
          
          <dns value="localhost" />
        </identity>
      </endpoint>
    </client>
  </system.serviceModel>
I believe it was readerquotas issue, But I was no luck hope anybody can post on howto make it work.

Thanks

simplicio
Roses are #FF0000 Violets are #0000FF all my base are belong to you
Répondre
Fil
Voir

Click here to load this message in the networking platform