C# 格式化程序引发异常…读取XML数据时已超过最大字符串内容长度配额(8192)

C# 格式化程序引发异常…读取XML数据时已超过最大字符串内容长度配额(8192),c#,wcf,asp.net-mvc-4,web-config,app-config,C#,Wcf,Asp.net Mvc 4,Web Config,App Config,每当我尝试使用wcf服务通过服务器将xmlString保存为文本文件时,总会出现以下错误: 格式化程序在尝试反序列化消息时引发异常:反序列化操作的请求消息体时出错 “保存注释”。已设置最大字符串内容长度配额8192 读取XML数据时已超过。这一配额可增加10% 更改服务器上的MaxStringContentLength属性 创建XML读取器时使用的XmlDictionaryReaderQuotas对象。 第1行,位置21897 每当我试图通过调用wcf服务来保存xmlstring时,就会出现此异

每当我尝试使用wcf服务通过服务器将xmlString保存为文本文件时,总会出现以下错误:

格式化程序在尝试反序列化消息时引发异常:反序列化操作的请求消息体时出错 “保存注释”。已设置最大字符串内容长度配额8192 读取XML数据时已超过。这一配额可增加10% 更改服务器上的MaxStringContentLength属性 创建XML读取器时使用的XmlDictionaryReaderQuotas对象。 第1行,位置21897

每当我试图通过调用wcf服务来保存xmlstring时,就会出现此异常

以下是我的WebConfig客户端配置设置和AppConfig服务器配置设置:

网络配置设置

AppConfig设置:


你能给我看一下代码吗…可能是
 <system.serviceModel>
    <bindings>
      <wsHttpBinding>
        <binding name="WSHttpBinding_IConversion"  closeTimeout="00:10:00" openTimeout="00:10:00"
          sendTimeout="00:10:00" bypassProxyOnLocal="false" maxBufferPoolSize="524288"    maxReceivedMessageSize="2147483647" useDefaultWebProxy="true">
          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
           maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
        </binding>
      </wsHttpBinding>
    </bindings>    
    <client>      
      <endpoint address="http://localhost:8092/ServiceModelSamples/service"
        binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IConversion"
        contract="ConversionEngineService.IConversion" name="WSHttpBinding_IConversion">
        <identity>
          <servicePrincipalName value="host/PrasenjitDas-PC" />
        </identity>
      </endpoint>
    </client>
  </system.serviceModel>
<system.serviceModel>  
    <client />
    <services>
      <service name="ConversionEngineService.Conversion"
               behaviorConfiguration="ConversionServiceBehavior">
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8099/ServiceModelSamples/service"/>
          </baseAddresses>
        </host>
        <!-- this endpoint is exposed at the base address provided by host: http://localhost:8000/ServiceModelSamples/service  -->
        <endpoint address="http://localhost:8092/ServiceModelSamples/service"
                  binding="wsHttpBinding"
                  contract="ConversionEngineService.IConversion"  />
        <!--bindingConfiguration="SecureHttpBinding" name="SecureHttp"-->
        <!-- the mex endpoint is exposed at http://localhost:8099/ServiceModelSamples/service/mex/ -->
        <endpoint address="mex"
                  binding="mexHttpBinding"
                  contract="IMetadataExchange"  />

      </service>

    </services>
      <bindings >
      <wsHttpBinding>
        <binding name="wsHttpBinding"
            messageEncoding="Mtom" closeTimeout="00:10:00" openTimeout="00:10:00" sendTimeout="00:10:00" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647" receiveTimeout="00:10:00">
          <readerQuotas maxDepth="64" maxStringContentLength="2147483647" maxArrayLength="2147483647"  maxBytesPerRead="2147483647"/>

          <security mode="None">
            <transport clientCredentialType="None" />
          </security>
        </binding>
      </wsHttpBinding>
    </bindings>

      <behaviors>
      <serviceBehaviors>
        <behavior name="ConversionServiceBehavior">

          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="False"/>
           <serviceThrottling maxConcurrentCalls="500"
                   maxConcurrentInstances ="100" 
                  maxConcurrentSessions ="200"/>
          <!--added by hr on 31.10.2013-->
          <dataContractSerializer maxItemsInObjectGraph="2147483647"  ignoreExtensionDataObject="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>