简体   繁体   English

反序列化类型的对象时发生错误...读取XML数据时超出了最大字符串内容长度配额(8192)

[英]There was an error deserializing the object of type … The maximum string content length quota (8192) has been exceeded while reading XML data

Iam get an intemittant error when posting to a WCF webservice Iam发布到WCF Web服务时收到一个内部错误

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.

I have tried various different suggestions but with no luck 我尝试了各种不同的建议,但没有运气

Can anyone see what iam missing or doing incorrectly ? 谁能看到我遗漏的东西或做错了什么?

thanks 谢谢

The config file on the client is 客户端上的配置文件是

<?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>

The config file for the web service is 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配置文件中来解决此问题

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将 XML 字符串发送到 WCF 时出现“读取 XML 数据时已超出最大字符串内容长度配额 (8192)”错误 - "The maximum string content length quota (8192) has been exceeded while reading XML data" error while sending XML string to WCF “在读取XML数据时已超出最大字符串内容长度配额(8192)”将XML字符串发送到WCF时出错 - “The maximum string content length quota (8192) has been exceeded while reading XML data” error while sending XML string to WCF WCF-读取XML数据时超出了最大字符串内容长度配额(8192) - WCF - The maximum string content length quota (8192) has been exceeded while reading XML data 已超过最大字符串内容长度配额(8192)。增加XmlDictionaryReaderQuotas的MaxStringContentLength属性 - The maximum string content length quota (8192) has been exceeded.Increase the MaxStringContentLength property on the XmlDictionaryReaderQuotas WCF Config修复最大字符串内容长度配额(8192) - WCF Config to fix The maximum string content length quota (8192) has been exceeded ServiceStack:读取XML数据时已超出最大数组长度配额(16384) - ServiceStack: The maximum array length quota (16384) has been exceeded while reading XML data WCF:读取XML数据时已超出最大数组长度配额(16384) - WCF: The maximum array length quota (16384) has been exceeded while reading XML data 读取XML数据时超出了最大字符串内容长度 - The maximum string content length exceeded while reading XML data WCF - 读取XML数据时已超出最大名称表字符计数配额(16384) - WCF - The maximum nametable character count quota (16384) has been exceeded while reading XML data 读取XML数据时已超出最大名称字符集计数配额(16384) - The maximum nametable character count quota (16384) has been exceeded while reading XML data
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM