Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>After a lot of investigation finnally i got the solution. Actually a number of things need to be changed.</p> <p>The following changes needed to be done in <strong>Server-side</strong>.</p> <p><strong>First</strong> I had to set a <em>maxRequestLength</em> to a larger value in my <em>httpRuntime</em> element to run the request for longer period.</p> <pre><code>&lt;system.web&gt; &lt;httpRuntime maxRequestLength="102400" /&gt; &lt;/system.web&gt; </code></pre> <p><strong>Second</strong> i introduced <strong>netTcpBinding</strong> binnding with custom changes on <code>maxBufferSize, maxBufferPoolSize, maxReceivedMessageSize</code> with a large value of <code>2147483647</code>.</p> <pre><code>&lt;binding name="myNetTcpBinding" maxBufferPoolSize="2147483647" maxBufferSize="524288" maxReceivedMessageSize="2147483647"&gt; </code></pre> <p><strong>Third</strong> add <code>maxItemsInObjectGraph</code> in both of the <code>serviceBehaviors</code> and <code>endpointBehaviors</code> like bellow (dont forget to mention the behaviour names in the <code>service</code> and <code>endpoint</code> node)</p> <pre><code> &lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name="myNetTcpBehaviour"&gt; &lt;serviceMetadata httpGetEnabled="true"/&gt; &lt;serviceDebug includeExceptionDetailInFaults="true"/&gt; &lt;dataContractSerializer maxItemsInObjectGraph="2147483647"/&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;endpointBehaviors&gt; &lt;behavior name="myNetTcpEndPointBehaviour"&gt; &lt;dataContractSerializer maxItemsInObjectGraph="2147483647"/&gt; &lt;/behavior&gt; &lt;/endpointBehaviors&gt; &lt;/behaviors&gt; </code></pre> <p><strong>Finally</strong> my server configuration looks like this</p> <pre><code>&lt;system.web&gt; &lt;httpRuntime maxRequestLength="102400" /&gt; &lt;/system.web&gt; &lt;system.serviceModel&gt; &lt;bindings&gt; &lt;wsHttpBinding&gt; &lt;binding name="MyWsHttpBinding" /&gt; &lt;/wsHttpBinding&gt; &lt;netTcpBinding&gt; &lt;binding name="myNetTcpBinding" 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="524288" maxConnections="10" maxReceivedMessageSize="2147483647"&gt; &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt; &lt;reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /&gt; &lt;security mode="Transport"&gt; &lt;transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" /&gt; &lt;/security&gt; &lt;/binding&gt; &lt;/netTcpBinding&gt; &lt;/bindings&gt; &lt;services&gt; &lt;service name="AdminService" behaviorConfiguration="myNetTcpBehaviour"&gt; &lt;endpoint address="AdminSrv" binding="netTcpBinding" bindingConfiguration="myNetTcpBinding" contract="IAdminService" behaviorConfiguration="myNetTcpEndPointBehaviour"/&gt; &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /&gt; &lt;host&gt; &lt;baseAddresses&gt; &lt;add baseAddress="/Bus/IRfotoWCF" /&gt; &lt;/baseAddresses&gt; &lt;/host&gt; &lt;/service&gt; &lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name="myNetTcpBehaviour"&gt; &lt;serviceMetadata httpGetEnabled="true"/&gt; &lt;serviceDebug includeExceptionDetailInFaults="true"/&gt; &lt;dataContractSerializer maxItemsInObjectGraph="2147483647"/&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;endpointBehaviors&gt; &lt;behavior name="myNetTcpEndPointBehaviour"&gt; &lt;dataContractSerializer maxItemsInObjectGraph="2147483647"/&gt; &lt;/behavior&gt; &lt;/endpointBehaviors&gt; &lt;/behaviors&gt; &lt;serviceHostingEnvironment multipleSiteBindingsEnabled="true"&gt;&lt;/serviceHostingEnvironment&gt; &lt;/system.serviceModel&gt; </code></pre> <p>Now on the <strong>client-side</strong> configuratioin you need to change the <code>maxBufferSize="2147483647" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647"</code> </p> <p><strong>and</strong> also you need to add <code>maxItemsInObjectGraph="2147483647"</code> in endpoint behaviour configuration.</p> <pre><code> &lt;endpointBehaviors&gt; &lt;behavior name="myEndPointBehavior"&gt; &lt;dataContractSerializer maxItemsInObjectGraph="2147483647" /&gt; &lt;/behavior&gt; &lt;/endpointBehaviors&gt; </code></pre> <p>Now i can transmit <strong>30000</strong> rows within <strong>5.30 min</strong> where the query executed for 10 sec so the transmission time is 5.20 min - <strong>still a lot</strong>.</p> <p>Feel free to comment and any suggestion for improvement.</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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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