2010-05-04 5 views
2

내 WCF 서비스가 더 큰 문자열을 처리 할 수 ​​있도록하는 데 문제가 있습니다. 다음과 같은 오류가 계속 발생합니다.Xml 리더 작성 문제

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

App.config

<?xml version="1.0" encoding="utf-8" ?> 
<configuration> 

    <system.web> 
    <compilation debug="true" /> 
    </system.web> 
    <!-- When deploying the service library project, the content of the config file must be added to the host's 
    app.config file. System.Configuration does not support config files for libraries. --> 
    <system.serviceModel> 
    <bindings> 
     <wsHttpBinding> 
     <binding name="wsHttpBindingSettings" maxReceivedMessageSize="2147483647"> 
      <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" 
      maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> 
     </binding> 
     </wsHttpBinding> 
    </bindings> 
    <services> 
     <service name="WCFLongString.Service1" > 
     <endpoint address="" binding="wsHttpBinding" contract="WCFLongString.IService1" bindingConfiguration="wsHttpBindingSettings"> 
      <identity> 
      <dns value="localhost" /> 
      </identity> 
     </endpoint> 
     <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> 
     <host> 
      <baseAddresses> 
      <add baseAddress="http://localhost:8732/Design_Time_Addresses/WCFLongString/Service1/" /> 
      </baseAddresses> 
     </host> 
     </service> 
    </services> 
    <behaviors> 
     <serviceBehaviors> 
     <behavior> 
      <!-- To avoid disclosing metadata information, 
      set the value below to false and remove the metadata endpoint above before deployment --> 
      <serviceMetadata httpGetEnabled="True"/> 
      <!-- To receive exception details in faults for debugging purposes, 
      set the value below to true. Set to false before deployment 
      to avoid disclosing exception information --> 
      <serviceDebug includeExceptionDetailInFaults="False" /> 
     </behavior> 
     </serviceBehaviors> 
    </behaviors> 
    </system.serviceModel> 

</configuration> 

처럼 보인다 내가 여기서 뭔가를 놓치고 있습니까?

+1

이 설정이 클라이언트와 서버 모두에서 구성 되었습니까? – bzlm

+0

Havent는 클라이언트까지 아직 도착했습니다. VS에서 WCF 구성 도구를 사용하여 테스트하고 있습니다. –

답변

0

테스트 도구를 사용하고 있기 때문일 수 있습니다. 서비스에 대한 간단한 소비자를 만들어 문제가 지속되는지 확인하십시오. 그리고 만약 당신이 서비스에서 위와 같이 클라이언트에서 같은 구성을 설정합니다.