WCF issues sending large data - "An existing connection was forcibly closed by the remote host"http://forums.asp.net/t/1517757.aspx/1?WCF+issues+sending+large+data+An+existing+connection+was+forcibly+closed+by+the+remote+host+Tue, 28 Sep 2010 17:33:01 -040015177573637037http://forums.asp.net/p/1517757/3637037.aspx/1?WCF+issues+sending+large+data+An+existing+connection+was+forcibly+closed+by+the+remote+host+WCF issues sending large data - "An existing connection was forcibly closed by the remote host" <p>Hi Guys</p> <p>I&nbsp;have been pulling my hair out trying to fix an issue with sending data over WCF, I have read pretty much every THREAD on this forum&nbsp;regarding or similar to this issue without any successful solution.&nbsp;</p> <p>I have a simple data object which has a <strong>[DataMember]</strong> with a data type of<strong> byte[]</strong>. I use this to send binary data from my web app as follows:</p> <p><strong>Asp.net MVC website --&gt; WCF Client (Has my Service References)&nbsp;--&gt; My Services (MyServices.svc) --&gt; Business/Data Tier</strong></p> <p>Everything is being executed from within VS 2008 Pro.</p> <p>&nbsp;</p> <p>Now I have successfully sent data up to <strong>2.2MB</strong>, however it fails if i try and send a file such as <strong>2.3MB&nbsp;or larger</strong>&nbsp;i get the following exceptions:</p> <p><strong><u>General Exception</u></strong></p> <p>Exception rethrown at [0]: <br> &nbsp;&nbsp; at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)<br> &nbsp;&nbsp; at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&amp; msgData, Int32 type)<br> &nbsp;&nbsp; at SoftApp.WCFClient.MyServiceReference.IMyService.Document_Save(DtoDocument dtoDocument, Int32 usercode)<br> &nbsp;&nbsp; at SoftApp.WCFClient.MyServiceReference.MyServiceClient.Document_Save(DtoDocument dtoDocument, Int32 usercode) in c:\dev\softapp\softapp.wcfclient\service references\myservicereference\reference.cs:line 167<br> &nbsp;&nbsp; at SoftApp.WebsiteServices.MyService.Document_Save(DtoDocument dtoDocument, Int32 usercode) in C:\Dev\SoftApp\SoftApp.WebsiteServices\MyService.cs:line 146<br> &nbsp;&nbsp; at SoftApp.Website.Controllers.CaseController.EditDocument(Int32 id, String description, String unique, String filename) in C:\Dev\SoftApp\SoftApp.Website\Controllers\CaseController.cs:line 422<br> &nbsp;&nbsp; <br> An error occurred while receiving the HTTP response to <a href="http://localhost:9002/MyService.svc"> http://localhost:9002/MyService.svc</a>. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.</p> <p><strong><u>Inner Exceptions - Parent/Child Order</u></strong></p> <p>InnerException&nbsp;{&quot;The underlying connection was closed: An unexpected error occurred on a receive.&quot;}&nbsp;System.Exception {System.Net.WebException}</p> <p>InnerException&nbsp;{&quot;Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.&quot;}&nbsp;System.Exception {System.IO.IOException}</p> <p>InnerException&nbsp;{&quot;An existing connection was forcibly closed by the remote host&quot;}&nbsp;System.Exception {System.Net.Sockets.SocketException}</p> <p><strong><u>MyService.svc - web.config</u></strong></p> <p>&nbsp;&nbsp;&nbsp; &lt;services&gt;<br> &nbsp;&nbsp;&nbsp;&lt;service name=&quot;SoftApp.WS.MyService&quot; behaviorConfiguration=&quot;SoftApp.WS.MyServiceBehavior&quot;&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&lt;endpoint address=&quot;&quot; binding=&quot;wsHttpBinding&quot; contract=&quot;SoftApp.WS.IMyService&quot; bindingConfiguration=&quot;largerMessage&quot;&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;identity&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;dns value=&quot;localhost&quot;/&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/identity&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&lt;/endpoint&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&lt;endpoint address=&quot;mex&quot; binding=&quot;mexHttpBinding&quot; contract=&quot;IMetadataExchange&quot;/&gt;<br> &nbsp;&nbsp;&nbsp;&lt;/service&gt;<br> &nbsp;&nbsp;&lt;/services&gt;</p> <p>&nbsp;&nbsp;&nbsp; &lt;bindings&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;wsHttpBinding&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;binding name=&quot;largerMessage&quot; closeTimeout=&quot;10:01:00&quot;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; openTimeout=&quot;10:01:00&quot; receiveTimeout=&quot;10:10:00&quot; sendTimeout=&quot;10:01:00&quot;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bypassProxyOnLocal=&quot;false&quot; hostNameComparisonMode=&quot;StrongWildcard&quot;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; maxBufferPoolSize=&quot;50000000&quot; maxReceivedMessageSize=&quot;50000000&quot; messageEncoding=&quot;Text&quot;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; textEncoding=&quot;utf-8&quot; useDefaultWebProxy=&quot;true&quot; allowCookies=&quot;false&quot;&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;readerQuotas maxDepth=&quot;50000000&quot; maxStringContentLength=&quot;50000000&quot; maxArrayLength=&quot;50000000&quot; maxBytesPerRead=&quot;50000000&quot; /&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/binding&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/wsHttpBinding&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;mexHttpBinding&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;binding name=&quot;largeMessageMEX&quot;/&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/mexHttpBinding&gt;<br> &nbsp;&nbsp;&nbsp; &lt;/bindings&gt;<br> &nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&lt;behaviors&gt;<br> &nbsp;&nbsp;&nbsp;&lt;serviceBehaviors&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&lt;behavior name=&quot;SoftApp.WS.MyServiceBehavior&quot;&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;serviceMetadata httpGetEnabled=&quot;true&quot;/&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;serviceDebug includeExceptionDetailInFaults=&quot;false&quot;/&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&lt;/behavior&gt;<br> &nbsp;&nbsp;&nbsp;&lt;/serviceBehaviors&gt;<br> &nbsp;&nbsp;&lt;/behaviors&gt;</p> <p>&nbsp;</p> <p><strong><u>WCF Client - app.config</u></strong></p> <p>&lt;binding name=&quot;WSHttpBinding_IMyService&quot; closeTimeout=&quot;00:01:00&quot;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; openTimeout=&quot;00:01:00&quot; receiveTimeout=&quot;00:10:00&quot; sendTimeout=&quot;00:01:00&quot;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bypassProxyOnLocal=&quot;false&quot; transactionFlow=&quot;false&quot; hostNameComparisonMode=&quot;StrongWildcard&quot;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; maxBufferPoolSize=&quot;50000000&quot; maxReceivedMessageSize=&quot;50000000&quot; messageEncoding=&quot;Text&quot;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; textEncoding=&quot;utf-8&quot; useDefaultWebProxy=&quot;true&quot; allowCookies=&quot;false&quot;&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;readerQuotas maxDepth=&quot;50000000&quot; maxStringContentLength=&quot;50000000&quot; maxArrayLength=&quot;50000000&quot;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; maxBytesPerRead=&quot;50000000&quot; maxNameTableCharCount=&quot;50000000&quot; /&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;reliableSession ordered=&quot;true&quot; inactivityTimeout=&quot;00:10:00&quot;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; enabled=&quot;false&quot; /&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;security mode=&quot;Message&quot;&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;transport clientCredentialType=&quot;Windows&quot; proxyCredentialType=&quot;None&quot;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; realm=&quot;&quot;&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;extendedProtectionPolicy policyEnforcement=&quot;Never&quot; /&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/transport&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;message clientCredentialType=&quot;Windows&quot; negotiateServiceCredential=&quot;true&quot;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; algorithmSuite=&quot;Default&quot; establishSecurityContext=&quot;true&quot; /&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/security&gt;<br> &lt;/binding&gt;</p> <p>&lt;endpoint address=&quot;<a href="http://localhost:9002/MyService.svc">http://localhost:9002/MyService.svc</a>&quot; binding=&quot;wsHttpBinding&quot;<br> bindingConfiguration=&quot;WSHttpBinding_IMyService&quot; contract=&quot;MyServiceReference.IMyService&quot;<br> name=&quot;WSHttpBinding_IMyService&quot;&gt;<br> &lt;identity&gt;<br> &nbsp; &lt;dns value=&quot;localhost&quot; /&gt;<br> &lt;/identity&gt;<br> &lt;/endpoint&gt;</p> <p><strong><u>MVC Website - web.config</u></strong></p> <p>I have also added the following to the we.config as suggested by another Post.</p> <p>&lt;httpRuntime<br> executionTimeout=&quot;110&quot;<br> maxRequestLength=&quot;8096&quot;<br> requestLengthDiskThreshold=&quot;8096&quot;<br> useFullyQualifiedRedirectUrl=&quot;false&quot;<br> minFreeThreads=&quot;8&quot;<br> minLocalRequestFreeThreads=&quot;4&quot;<br> appRequestQueueLimit=&quot;5000&quot;<br> enableKernelOutputCache=&quot;true&quot;<br> enableVersionHeader=&quot;true&quot;<br> requireRootedSaveAsPath=&quot;true&quot;<br> enable=&quot;true&quot;<br> shutdownTimeout=&quot;90&quot;<br> delayNotificationTimeout=&quot;5&quot;<br> waitChangeNotification=&quot;0&quot;<br> maxWaitChangeNotification=&quot;0&quot;<br> enableHeaderChecking=&quot;true&quot;<br> sendCacheControlHeader=&quot;true&quot;<br> apartmentThreading=&quot;false&quot;/&gt;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>I really need to get this sorted, I have searched the entire Web and can't find a solution. Any help would be really appreciated!</p> <p>Maybe if we can all put our brains together and work on resolving this, we can help many others too as it seems a lot of people are experiencing similar problems.</p> <p>Thanks in advance!</p> <p>&nbsp;</p> 2010-01-24T15:39:23-05:003637191http://forums.asp.net/p/1517757/3637191.aspx/1?Re+WCF+issues+sending+large+data+An+existing+connection+was+forcibly+closed+by+the+remote+host+Re: WCF issues sending large data - "An existing connection was forcibly closed by the remote host" <p>Are you going through a proxy server?</p> <p>Need to see the way you open the connection and the format the data when you send.</p> <p>2.3 megs is not that large, and should go quick with a fast connection. <br> </p> 2010-01-24T18:31:55-05:003637210http://forums.asp.net/p/1517757/3637210.aspx/1?Re+WCF+issues+sending+large+data+An+existing+connection+was+forcibly+closed+by+the+remote+host+Re: WCF issues sending large data - "An existing connection was forcibly closed by the remote host" <p>I am not using a proxy server, i am just&nbsp;running this solution within&nbsp;VS 2008 Pro. I agree 2.3mb is not very large at all.</p> <p>I&nbsp;just reference the WcfServiceLibrary which has all my Service references i.e.&nbsp;<a href="http://localhost:9002/MyService.svc">Http://localhost:9002/MyService.svc</a></p> <p>&nbsp;&nbsp;</p> 2010-01-24T18:55:54-05:003637349http://forums.asp.net/p/1517757/3637349.aspx/1?Re+WCF+issues+sending+large+data+An+existing+connection+was+forcibly+closed+by+the+remote+host+Re: WCF issues sending large data - "An existing connection was forcibly closed by the remote host" <p>I've never used wcf, because I've always been kind or skeptical of some of their easy to use technology. There always seems to be a price to pay for ease of programming and use.</p> <p>What does your project do?, I'm just curious.<br> </p> 2010-01-24T21:24:44-05:003639040http://forums.asp.net/p/1517757/3639040.aspx/1?Re+WCF+issues+sending+large+data+An+existing+connection+was+forcibly+closed+by+the+remote+host+Re: WCF issues sending large data - "An existing connection was forcibly closed by the remote host" <p>This&nbsp;app makes up the document management side of a larger development targeted at the legal industry.</p> <p>&nbsp;</p> <p><strong>Is there anyone out there who knows how to fix this issue, any Microsoft&nbsp;WCF Employee's...... come on???????????????</strong>&nbsp;</p> 2010-01-25T15:46:20-05:003661035http://forums.asp.net/p/1517757/3661035.aspx/1?Re+WCF+issues+sending+large+data+An+existing+connection+was+forcibly+closed+by+the+remote+host+Re: WCF issues sending large data - "An existing connection was forcibly closed by the remote host" <p>I'm no Microsoft expert but I've been having the same problems as you. I've tried little bits and pieces of suggestions from many different blogs but I'll tell you what I did to my Web.config to get this going.</p> <p>Strange&nbsp;part about all of this is that I had no problems when I ran the code on my own computer using ASP.NET Development Server. It's only when I published to IIS 7.0 on a dedicated web server that I started gettings problems with the size of the data files.</p> <p>My service takes a flat data file, converts in to a dataset, and transports the dataset to a SQL 2008 database table. I could transfer up to 4000 records but anything larger than that got the error. </p> <p>It's hard to determine exactly how large a dataset would be in memory but I ran a query of 4000 records from this table, copied to notepad and it produced a file of 2.025MB. 5000 records would fail. Copying these records to notepad produced a file sized 2.521MB. Sounds familiar?</p> <p>First, I tweaked the bindings.&nbsp;Here are the items I changed...anwhere you see these properties, client or server section in the&nbsp;web.config, change them.</p> <p><font color="#ff0000" size="2"><font color="#ff0000" size="2">maxBufferPoolSize</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">=</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">524288</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2"> </font></font><font color="#ff0000" size="2"><font color="#ff0000" size="2">maxReceivedMessageSize</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">=</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">2147483647</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2"> </font></font><font color="#ff0000" size="2"><font color="#ff0000" size="2">maxDepth</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">=</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">999</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2"> </font></font><font color="#ff0000" size="2"><font color="#ff0000" size="2">maxStringContentLength</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">=</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">2147483647</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2"> </font></font><font color="#ff0000" size="2"><font color="#ff0000" size="2">maxArrayLength</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">=</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">2147483647</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2"> </font></font><font color="#ff0000" size="2"><font color="#ff0000" size="2">maxBytesPerRead</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">=</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">2147483647</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2"> </font></font><font color="#ff0000" size="2"><font color="#ff0000" size="2">maxNameTableCharCount</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">=</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">2147483647</font></font><font size="2">&quot;</font></p> <p>Next,&nbsp;I tweaked the &lt;Behaviors&gt; section...I added what you see below. </p> <p></p> <p><font color="#a31515" size="2"><font color="#a31515" size="2">&lt;endpointBehaviors</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">&gt;&lt;</font></font><font color="#a31515" size="2"><font color="#a31515" size="2">behavior</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2"> </font></font><font color="#ff0000" size="2"><font color="#ff0000" size="2">name</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">=</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">customQuotaBehavior</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">&gt;</font></font><font color="#a31515" size="2"><font color="#a31515" size="2">dataContractSerializer</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2"> </font></font><font color="#ff0000" size="2"><font color="#ff0000" size="2">maxItemsInObjectGraph</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">=</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">2147483647</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">/&gt;&lt;/</font></font><font color="#a31515" size="2"><font color="#a31515" size="2">behavior</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">&gt;&lt;/</font></font><font color="#a31515" size="2"><font color="#a31515" size="2">endpointBehaviors</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">&gt;</font></font></p> <p>Make sure sure add this behavior confguation to your service endpoint...</p> <p>&nbsp;<font color="#ff0000" size="2"><font color="#ff0000" size="2">behaviorConfiguration</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">=</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">customQuotaBehavior</font></font><font size="2">&quot;</font></p> <p>&nbsp;<font size="2">Finally, and quite possibly the most important in the &lt;httpRuntime&gt; in the system.web&nbsp;section. The maxRequestLength probably the most important...</font></p> <p><font color="#0000ff" size="2"><font color="#0000ff" size="2"></p> <p>&lt;</font></font><font color="#a31515" size="2"><font color="#a31515" size="2">httpRuntime</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2"> </font></font><font color="#ff0000" size="2"><font color="#ff0000" size="2">executionTimeout</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">=</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">90</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2"> </font></font><font color="#ff0000" size="2"><font color="#ff0000" size="2">maxRequestLength</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">=</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">1048576</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2"> </font></font><font color="#ff0000" size="2"><font color="#ff0000" size="2">useFullyQualifiedRedirectUrl</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">=</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">false</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2"> </font></font><font color="#ff0000" size="2"><font color="#ff0000" size="2">minFreeThreads</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">=</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">8</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2"> </font></font><font color="#ff0000" size="2"><font color="#ff0000" size="2">minLocalRequestFreeThreads</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">=</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">4</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2"> </font></font><font color="#ff0000" size="2"><font color="#ff0000" size="2">appRequestQueueLimit</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">=</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">100</font></font><font size="2">&quot;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">/&gt;</font></font></p> <p></p> <p><font size="2">I&nbsp;wish I could tell you the exact&nbsp;change to the&nbsp;web.config that made it work but I don't really know. I don't think anyone does!...even the Microsoft experts.</font><font size="2">&nbsp;</font></p> 2010-02-04T16:50:38-05:003661675http://forums.asp.net/p/1517757/3661675.aspx/1?Re+WCF+issues+sending+large+data+An+existing+connection+was+forcibly+closed+by+the+remote+host+Re: WCF issues sending large data - "An existing connection was forcibly closed by the remote host" <p>Thanks for your input, i'll try this first thing tomorrow and feedback asap.</p> <p>&nbsp;</p> 2010-02-04T23:31:44-05:003687564http://forums.asp.net/p/1517757/3687564.aspx/1?Re+WCF+issues+sending+large+data+An+existing+connection+was+forcibly+closed+by+the+remote+host+Re: WCF issues sending large data - "An existing connection was forcibly closed by the remote host" <p>Sorry for the&nbsp;delay in feedback. I have tried what you suggested and still i get the same issue.&nbsp;</p> 2010-02-18T15:55:03-05:003776577http://forums.asp.net/p/1517757/3776577.aspx/1?Re+WCF+issues+sending+large+data+An+existing+connection+was+forcibly+closed+by+the+remote+host+Re: WCF issues sending large data - "An existing connection was forcibly closed by the remote host" <p>Hi I'm wondering, do you finally find a solution to this problem?</p> <p>I've got the same problem right now. I'm gonna try the solution proposed here. But I have no hope it works... Since 3 days I've modified all the config files without any change.</p> <p>So if you find a solution, please let me know</p> <p>&nbsp;</p> <p>thanks!</p> <p>&nbsp;</p> <p>(sorry for my english, this is not my mother tong ;) )</p> 2010-04-09T12:14:42-04:004045585http://forums.asp.net/p/1517757/4045585.aspx/1?Re+WCF+issues+sending+large+data+An+existing+connection+was+forcibly+closed+by+the+remote+host+Re: WCF issues sending large data - "An existing connection was forcibly closed by the remote host" <p>I&nbsp;am using the same solution and having the same issue as you did.</p> <p>Did you actually solve this problem?</p> <p>Why having problem sending data larger than 2.2M, I had increased all the size limitations.</p> <p>Anyone get a solution?&nbsp;</p> 2010-08-25T18:32:58-04:004045926http://forums.asp.net/p/1517757/4045926.aspx/1?Re+WCF+issues+sending+large+data+An+existing+connection+was+forcibly+closed+by+the+remote+host+Re: WCF issues sending large data - "An existing connection was forcibly closed by the remote host" <p>Solved by increasing&nbsp;<font color="#ff0000" size="2"><font color="#ff0000" size="2">maxRequestLength</font></font>&nbsp;on wcf service server side web.config</p> 2010-08-25T23:29:54-04:004102185http://forums.asp.net/p/1517757/4102185.aspx/1?Re+WCF+issues+sending+large+data+An+existing+connection+was+forcibly+closed+by+the+remote+host+Re: WCF issues sending large data - "An existing connection was forcibly closed by the remote host" <p>In my case the following solved it</p> <p>On the server side, increase the size of&nbsp;maxItemsInObjectGraph&nbsp;</p> <p></p> &lt;div style=&quot;position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;&quot; id=&quot;_mcePaste&quot;&gt;&lt;behaviors&gt;&lt;/div&gt; &lt;div style=&quot;position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;&quot; id=&quot;_mcePaste&quot;&gt;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &lt;serviceBehaviors&gt;&lt;/div&gt; &lt;div style=&quot;position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;&quot; id=&quot;_mcePaste&quot;&gt;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;behavior name=&quot;ServiceBehavior&quot;&gt;&lt;/div&gt; &lt;div style=&quot;position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;&quot; id=&quot;_mcePaste&quot;&gt;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;dataContractSerializer maxItemsInObjectGraph =&quot;2147483647&quot;/&gt;&lt;/div&gt; &lt;div style=&quot;position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;&quot; id=&quot;_mcePaste&quot;&gt;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;serviceThrottling&lt;/div&gt; &lt;div style=&quot;position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;&quot; id=&quot;_mcePaste&quot;&gt;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; maxConcurrentCalls=&quot;16&quot;&lt;/div&gt; &lt;div style=&quot;position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;&quot; id=&quot;_mcePaste&quot;&gt;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; maxConcurrentInstances=&quot;26&quot;&lt;/div&gt; &lt;div style=&quot;position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;&quot; id=&quot;_mcePaste&quot;&gt;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; maxConcurrentSessions=&quot;10&quot;&lt;/div&gt; &lt;div style=&quot;position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;&quot; id=&quot;_mcePaste&quot;&gt;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /&gt;&lt;/div&gt; &lt;div style=&quot;position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;&quot; id=&quot;_mcePaste&quot;&gt;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/behavior&gt;&lt;/div&gt; &lt;div style=&quot;position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;&quot; id=&quot;_mcePaste&quot;&gt;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &lt;/serviceBehaviors&gt;&lt;/div&gt; &lt;div style=&quot;position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;&quot; id=&quot;_mcePaste&quot;&gt;&nbsp;&nbsp; &nbsp; &nbsp;&lt;/behaviors&gt;&lt;/div&gt; <p><br> </p> <p></p> <p></p> <p>&lt;behaviors&gt;</p> <p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &lt;serviceBehaviors&gt;</p> <p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;behavior name=&quot;ServiceBehavior&quot;&gt;</p> <p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;dataContractSerializer <b>maxItemsInObjectGraph =&quot;2147483647&quot;</b>/&gt;</p> <p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;serviceThrottling</p> <p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; maxConcurrentCalls=&quot;16&quot;</p> <p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; maxConcurrentInstances=&quot;26&quot;</p> <p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; maxConcurrentSessions=&quot;10&quot;</p> <p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /&gt;</p> <p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/behavior&gt;</p> <p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &lt;/serviceBehaviors&gt;</p> <p>&nbsp;&nbsp; &nbsp; &nbsp;&lt;/behaviors&gt;</p> <p></p> <p>On the client side, make sure to specify the same behavior:<br> </p> <p>&lt;behaviors&gt;</p> <p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;endpointBehaviors&gt;</p> <p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;behavior name=&quot;ServiceBehavior&quot;&gt;</p> <p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <b>&nbsp;&lt;dataContractSerializer maxItemsInObjectGraph=&quot;2147483647&quot;/&gt;</b></p> <p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/behavior&gt;</p> <p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/endpointBehaviors&gt;</p> <p>&nbsp;&nbsp; &nbsp; &nbsp; &lt;/behaviors&gt;</p> <p></p> 2010-09-28T17:33:01-04:00