我们遇到了以下错误:
读取 XML 数据时已超出最大字符串内容长度配额 (8192)。可以通过更改创建 XML 阅读器时使用的 XmlDictionaryReaderQuotas 对象的 MaxStringContentLength 属性来增加此配额。
现在我们发现有很多线程在谈论编辑 web.config,当然我们也这样做了,但这似乎对我们的情况没有帮助。
我们正在对我们的 wcf 服务进行 ajax POST,我们可以看到服务器接收到数据。谁有解决方案?
<system.serviceModel>
<bindings>
<webHttpBinding>
<binding name="BIS.HttpBinding" maxBufferSize="2147483647" maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647" transferMode="Buffered">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</webHttpBinding>
</bindings>
<services>
<service name="QNH.Transponder.BIS.BISService" behaviorConfiguration="BIS.ServiceBehavior">
<endpoint address="" behaviorConfiguration="BIS.EndpointBehavior" binding="webHttpBinding" bindingConfiguration="BIS.HttpBinding" contract="QNH.Transponder.BIS.IBISService" />
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="BIS.EndpointBehavior">
<dataContractSerializer ignoreExtensionDataObject="true" maxItemsInObjectGraph="2147483647" />
<webHttp />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="BIS.ServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<dataContractSerializer ignoreExtensionDataObject="true" maxItemsInObjectGraph="2147483647" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
</system.serviceModel>