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

前端 未结 2 1394
借酒劲吻你
借酒劲吻你 2020-12-01 07:56

I have a wsf service and a client application. While trying to communicate the client and the service I\'ve gotten the following message:

\"The formatter threw

相关标签:
2条回答
  • 2020-12-01 08:23

    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?

    0 讨论(0)
  • 2020-12-01 08:42

    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>
    
    0 讨论(0)
提交回复
热议问题