C# 反序列化类型为…的对象时出错。。。。读取XML数据时已超过最大字符串内容长度配额(8192)

C# 反序列化类型为…的对象时出错。。。。读取XML数据时已超过最大字符串内容长度配额(8192),c#,wcf,web-services,C#,Wcf,Web Services,Iam在发布到WCF Web服务时收到一个INTERMITTENT错误 The exception message is 'There was an error deserializing the object of type. The maximum string content length quota (8192) has been exceeded while reading XML data. 我尝试过各种不同的建议,但没有成功 有人能看出我遗漏了什么或做得不正确吗 谢谢 客户

Iam在发布到WCF Web服务时收到一个INTERMITTENT错误

The exception message is 'There was an error deserializing the object of type. The maximum   
string content length quota (8192) has been exceeded while reading XML data.
我尝试过各种不同的建议,但没有成功

有人能看出我遗漏了什么或做得不正确吗

谢谢

客户端上的配置文件是

<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v4.0"    sku=".NETFramework,Version=v4.0"/></startup><system.serviceModel>
    <bindings>
        <wsHttpBinding>
            <binding name="WSHttpBinding_IAWSSESService" closeTimeout="00:01:00"
                openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                maxBufferPoolSize="5242880" maxReceivedMessageSize="655360"
                messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
                allowCookies="false">
                <readerQuotas maxDepth="320" maxStringContentLength="81920" maxArrayLength="163840"
                    maxBytesPerRead="40960" maxNameTableCharCount="163840" />
                <reliableSession ordered="true" inactivityTimeout="00:10:00"
                    enabled="false" />
                <security mode="None">
                    <transport clientCredentialType="Windows" proxyCredentialType="None"
                        realm="" />
                    <message clientCredentialType="Windows" negotiateServiceCredential="true" />
                </security>
            </binding>
        </wsHttpBinding>
    </bindings>
    <client>
        <endpoint address="http://localhost:20930/AWSSESService.svc"
            binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IAWSSESService"
            contract="AwsWebService.IAWSSESService" name="WSHttpBinding_IAWSSESService" />
    </client>
</system.serviceModel>
</configuration>

web服务的配置文件是

<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
<pages controlRenderingCompatibilityVersion="4.0"/>
  </system.web>
  <system.serviceModel>
<services>
  <service name="CG.Core.EmailService.AWSSESService">
    <endpoint address="" behaviorConfiguration="" binding="wsHttpBinding" contract="CG.Core.EmailService.IAWSSESService" bindingConfiguration="wsHttpDefaultConfig"/>
  </service>
</services>
<bindings>
  <wsHttpBinding>
    <binding name="wsHttpDefaultConfig">
      <reliableSession ordered="true" inactivityTimeout="00:10:00" />
      <security mode="None"/>
    </binding>
  </wsHttpBinding>
</bindings>
<behaviors>
  <serviceBehaviors>
    <behavior>
      <serviceMetadata httpGetEnabled="true"/>
       <serviceDebug includeExceptionDetailInFaults="false"/>
    </behavior>
  </serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="false"     multipleSiteBindingsEnabled="true"/>
  </system.serviceModel>
  <system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<!--
     -->
<directoryBrowse enabled="true"/>
  </system.webServer>
</configuration>


我通过从客户端复制wshttpbinding并将其粘贴到web配置文件来解决此问题

我通过从客户端复制wshttpbinding并将其粘贴到web配置文件来解决此问题

您确定错误消息是8192而不是81920吗?您还尝试了什么@问题很好。服务器和客户端都需要具有相同的readerQuota设置。您确定错误消息是8192而不是81920吗?您还尝试了什么@这个问题很好。服务器和客户端都需要具有相同的readerQuota设置。