Hi All,
I am getting below error while sending large data size (120kb) in wcf. For small size data it's working fine but it fail to send such files having size more than 100 KB.
Please find the error details and Config file details.
Error :-
Error:- Error while sending response to server Details The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'CrawlResponse'. 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. Line 1, position 47721.
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at ICrawlResponse.CrawlResponse(Byte[] CrawlResult, Int32 ByteCount)
at Pricing.CrawlManager.Client.SendXmlData.SendData()
Please find the Config details :-
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_ICrawlReceiver" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" allowCookies="false"
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="5242880000"
maxReceivedMessageSize="6553600" messageEncoding="Mtom"
textEncoding="utf-8" transferMode="Streamed"
useDefaultWebProxy="true">
<readerQuotas maxDepth="64" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://70.84.215.66/Receiver/Receiver"
binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_ICrawlReceiver"
contract="localhost.ICrawlReceiver"
name="BasicHttpBinding_ICrawlReceiver" />
</client>
<services>
<service name="Pricing.CrawlManager.Server.ResponseProcessor" behaviorConfiguration="ServiceBehavior">
<endpoint address="ResponseProcessor" binding="basicHttpBinding" contract="Pricing.CrawlManager.Communication.ICrawlResponse" />
Please help me to fix such issues.
Edit TR : Please used <pre> tags to make your code clearer, XML included.