WCF service The maximum array length quota (16384) has been exceeded

不羁的心 提交于 2019-11-27 07:36:11

Actually, I've solved the problem by adding readerQuotas within textMessageEncoding section. Thanks for the help.

<textMessageEncoding messageVersion="Soap11">
          <readerQuotas maxDepth="32" maxStringContentLength="5242880" maxArrayLength="2147483646" maxBytesPerRead="4096" maxNameTableCharCount="5242880"/>
</textMessageEncoding>

You should be able to add a <readerQuotas> element inside the <binding> element:

<customBinding> 
  <binding name="LicenseServiceBinding" 
                closeTimeout="00:01:00" openTimeout="00:01:00" 
                receiveTimeout="00:10:00" sendTimeout="00:01:00"> 
      <security authenticationMode="UserNameOverTransport"> 
          <localClientSettings maxClockSkew="00:07:00" /> 
          <localServiceSettings maxClockSkew="00:07:00" /> 
      </security> 
      <readerQuotas maxArrayLength="32768" />
      <windowsStreamSecurity /> 
      <httpsTransport maxReceivedMessageSize="2147483646"/>           
  </binding> 
</customBinding> 

You mentioned that it "doesn't allow me to insert". What error message do you get?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!