由于以下错误,我们遇到了一些问题:
读取XML数据时已超出最大字符串内容长度配额(8192)。可以通过更改在创建XML读取器时使用的MaxStringContentLength对象上的XmlDictionaryReaderQuotas属性来增加此配额。
现在我们已经发现有很多关于编辑web.config的线程,当然,我们这样做了,但这在我们的例子中似乎没有帮助。
我们正在对wcf服务进行ajax发布,我们可以看到服务器接收数据。有谁有解决办法吗?
<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>发布于 2013-06-13 11:16:09
您必须将服务器和client上的更改为更大的值,即8192。您只在服务器端更改为value。因此,看看您的客户端配置,以修复您的错误。
https://stackoverflow.com/questions/17083768
复制相似问题