I created a blob field for uploading large files. The file data is then converted into a byte array and sent to the WCF service.
Received the following error:
Quote:"The maximum array length quota (16384) has been exceeded while reading XML data. This quota may be increased by changing the MaxArrayLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader"
Resolved it by adding binding configurations in my Client/Server app.configs:
Code:
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="UserServiceServiceBindingConfiguration" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
hostNameComparisonMode="StrongWildcard" listenBacklog="10"
maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxConnections="10"
maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="32"
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
<security mode="Transport">
<transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
<message clientCredentialType="Windows" />
</security>
</binding>
</netTcpBinding>
</bindings>
<client>
<endpoint name="IUserService"
address="net.tcp://localhost:8002/UserService"
bindingConfiguration="UserServiceServiceBindingConfiguration"
binding="netTcpBinding"
contract="AIS.Batch.Services.IUserService"/>
</client>
</system.serviceModel>