Note that there are some explanatory texts on larger screens.

plurals
  1. PObug when try to send file in wcf
    primarykey
    data
    text
    <p>when I tried to send file using WCF service I get this exception </p> <blockquote> <p>The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'Send_File'. 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.</p> </blockquote> <p>I converted the file at first to array of Bytes before I sent it this is client configuration who sent the file </p> <pre><code>&lt;system.serviceModel&gt; &lt;bindings&gt; &lt;netTcpBinding&gt; &lt;binding name="TcpBinding" closeTimeout="10:00:00" openTimeout="10:00:00" receiveTimeout="10:00:00" sendTimeout="10:00:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="10000000" maxBufferSize="10000000" maxConnections="30" maxReceivedMessageSize="10000000"&gt; &lt;readerQuotas maxDepth="64" maxStringContentLength="10000000" maxArrayLength="100000000" maxBytesPerRead="10000000" maxNameTableCharCount="10000000" /&gt; &lt;reliableSession ordered="true" inactivityTimeout="10:00:00" enabled="false" /&gt; &lt;/binding&gt; &lt;/netTcpBinding&gt; &lt;wsDualHttpBinding&gt; &lt;binding name="HttpBinding" closeTimeout="10:00:00" openTimeout="10:00:00" receiveTimeout="10:00:00" sendTimeout="10:00:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="10000000" maxReceivedMessageSize="10000000" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"&gt; &lt;readerQuotas maxDepth="32" maxStringContentLength="10000000" maxArrayLength="10000000" maxBytesPerRead="10000000" maxNameTableCharCount="10000000" /&gt; &lt;reliableSession ordered="true" inactivityTimeout="10:00:00" /&gt; &lt;/binding&gt; &lt;/wsDualHttpBinding&gt; &lt;/bindings&gt; &lt;behaviors&gt; &lt;endpointBehaviors&gt; &lt;behavior name="filebehavior"&gt; &lt;dataContractSerializer maxItemsInObjectGraph="2000000000"/&gt; &lt;/behavior&gt; &lt;/endpointBehaviors&gt; &lt;/behaviors&gt; &lt;client&gt; &lt;endpoint address="net.tcp://localhost:8000/ChatRoom/service" behaviorConfiguration="filebehavior" binding="netTcpBinding" bindingConfiguration="TcpBinding" contract="ChatRoom" name="TcpBinding"&gt; &lt;identity&gt; &lt;servicePrincipalName value="my_machine\ASPNET" /&gt; &lt;/identity&gt; &lt;/endpoint&gt; &lt;endpoint address="http://localhost:8001/ChatRoom/service" binding="wsDualHttpBinding" bindingConfiguration="HttpBinding" contract="ChatRoom" name="HttpBinding"&gt; &lt;identity&gt; &lt;servicePrincipalName value="my_machine\ASPNET" /&gt; &lt;/identity&gt; &lt;/endpoint&gt; &lt;/client&gt; </code></pre> <p></p> <p>server configration </p> <pre><code>&lt;system.serviceModel&gt; &lt;bindings&gt; &lt;wsHttpBinding&gt; &lt;binding name="securingWSHttpBinding"&gt; &lt;/binding&gt; &lt;binding name="wsHttpBinding_ChatRoomServices" maxReceivedMessageSize="10000000" /&gt; &lt;/wsHttpBinding&gt; &lt;/bindings&gt; &lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name="ServiceBehavior"&gt; &lt;serviceDebug includeExceptionDetailInFaults="true"/&gt; &lt;serviceTimeouts transactionTimeout="10:00:00"/&gt; &lt;serviceMetadata httpGetEnabled="false"/&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;services&gt; &lt;service name="ChatRoomService.ChatRoom" behaviorConfiguration="ServiceBehavior"&gt; &lt;endpoint address="service" binding="netTcpBinding" contract="ChatRoomService.IChatRoom" name="TcpBinding"/&gt; &lt;endpoint address="service" binding="wsDualHttpBinding" contract="ChatRoomService.IChatRoom" name="HttpBinding"/&gt; &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" name="MexBinding"/&gt; &lt;host&gt; &lt;baseAddresses&gt; &lt;add baseAddress="net.tcp://localhost:8000/ChatRoom/"/&gt; &lt;add baseAddress="http://localhost:8001/ChatRoom/"/&gt; &lt;/baseAddresses&gt; &lt;/host&gt; &lt;/service&gt; &lt;/services&gt; &lt;/system.serviceModel&gt; </code></pre> <p>how I can solve this exception ?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload