2012-10-10 1 views
1

스피가 intemittant 오류가 XML 데이터를 읽는 동안 유형의 객체를 직렬화 복원 오류가 .... 최대 문자열 콘텐츠 길이 할당량 (8192)를 초과 한 있었다 다양한 제안을했지만 행운이 없었습니다.은 WCF의 웹 서비스</p> <pre><code>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. </code></pre> <p>에 게시 할 때

누락 된 부분이나 잘못보고있는 사람이 있습니까?

감사

클라이언트의 설정 파일이

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

웹 서비스에 대한 설정 파일은

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

오류 메시지가 8192가 아니라 8192인지 확인하십시오. –

+0

그 밖의 무엇을 시도 했습니까? @ JustinWilliams 질문이 좋다. –

+0

서버와 클라이언트 모두 동일한 readerQuota 설정이 필요합니다. – Rajesh

답변

1

나는 클라이언트에서있는 wsHttpBinding을 복사하여이 문제를 해결하기 위해 관리입니다 웹 구성 파일에 붙여 넣으십시오.

관련 문제