Note that there are some explanatory texts on larger screens.

plurals
  1. POWCF streaming large file
    primarykey
    data
    text
    <p>I read this article <a href="http://www.codeproject.com/Articles/166763/WCF-Streaming-Upload-Download-Files-Over-HTTP" rel="nofollow">http://www.codeproject.com/Articles/166763/WCF-Streaming-Upload-Download-Files-Over-HTTP</a> to upload large file via WCF. </p> <p>I've created the same configuration but I've just upload file 48kb even I added attribute <code>maxReceivedMessageSize ="2147483647"</code>. When I try to upload file over 48kb I got an error</p> <blockquote> <p><em>The remote server returned an error: (413) Request Entity Too Large.</em></p> </blockquote> <p>Did I get wrong or miss something? Below is my config</p> <p>Server config: </p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;configuration&gt; &lt;system.web&gt; &lt;compilation debug="true" targetFramework="4.0" /&gt; &lt;httpRuntime executionTimeout="4800" maxRequestLength="2097150"/&gt; &lt;/system.web&gt; &lt;system.serviceModel&gt; &lt;serviceHostingEnvironment multipleSiteBindingsEnabled="true" /&gt; &lt;!--BINDING--&gt; &lt;bindings&gt; &lt;basicHttpBinding&gt; &lt;binding name="TransferService" closeTimeout="00:10:00" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize ="2147483647" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" messageEncoding="Text" transferMode="Streamed" &gt; &lt;readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" maxArrayLength="2147483647"/&gt; &lt;/binding&gt; &lt;/basicHttpBinding&gt; &lt;/bindings&gt; &lt;!--SERVICE--&gt; &lt;services&gt; &lt;service name="TransferService.TransferService" behaviorConfiguration="TransferServiceBehavior" &gt; &lt;endpoint address="" binding="basicHttpBinding" bindingConfiguration="TransferService" contract="TransferService.ITransferService" &gt; &lt;/endpoint&gt; &lt;/service&gt; &lt;/services&gt; &lt;!--BEHAVIOR--&gt; &lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name="TransferServiceBehavior"&gt; &lt;serviceMetadata httpGetEnabled="true" /&gt; &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt; &lt;dataContractSerializer maxItemsInObjectGraph="2147483647" /&gt; &lt;serviceThrottling maxConcurrentCalls="500" maxConcurrentSessions="500" maxConcurrentInstances="500" /&gt; &lt;/behavior&gt; &lt;behavior name=""&gt; &lt;serviceMetadata httpGetEnabled="true" /&gt; &lt;serviceDebug includeExceptionDetailInFaults="false" /&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;/system.serviceModel&gt; &lt;system.webServer&gt; &lt;security&gt; &lt;requestFiltering&gt; &lt;requestLimits maxAllowedContentLength="500000000"&gt;&lt;/requestLimits&gt; &lt;/requestFiltering&gt; &lt;/security&gt; &lt;modules runAllManagedModulesForAllRequests="true"/&gt; &lt;/system.webServer&gt; &lt;/configuration&gt; </code></pre> <p>Web client config: </p> <pre><code>&lt;system.serviceModel&gt; &lt;bindings&gt; &lt;basicHttpBinding&gt; &lt;binding name="BasicHttpBinding_ITransferService" /&gt; &lt;/basicHttpBinding&gt; &lt;/bindings&gt; &lt;client&gt; &lt;endpoint name="BasicHttpBinding_ITransferService" address="http://localhost/transfer/TransferService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ITransferService" contract="TransferService.ITransferService" /&gt; &lt;/client&gt; &lt;/system.serviceModel&gt; </code></pre> <p>Please suggest any solutions. </p> <p>Thanks in advance</p> <hr> <p>Now I've changed config as your suggest but it's still raise the same error 400 or 413. Below is my test project. I don't know reason why? (Environment: Window 7 Pro 64 bit, IIS7 , WCF 4.0)</p> <p><a href="https://skydrive.live.com/redir?resid=BFE92959302FBAA0!105&amp;authkey=!ANO_URChpql9gKE" rel="nofollow">https://skydrive.live.com/redir?resid=BFE92959302FBAA0!105&amp;authkey=!ANO_URChpql9gKE</a></p> <p>I'm spent two week to research and but it's the same error.</p> <p>Please help me. Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    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