0
最初,我的上傳被限制爲64KB。WCF Rest上傳文件大小問題
我已經通過在網絡,並在此網站的多個建議走了,搞得以下更改
<bindings>
<webHttpBinding>
<binding name="StreamedRequestWebBinding"
maxReceivedMessageSize="10485760"
maxBufferPoolSize="10485760" maxBufferSize="10485760" closeTimeout="00:03:00"
openTimeout="00:03:00" receiveTimeout="00:10:00" sendTimeout="00:03:00">
<readerQuotas maxDepth="32" maxStringContentLength="10485760"
maxArrayLength="10485760" maxBytesPerRead="10485760" />
<security mode="None" />
</binding>
</webHttpBinding>
</bindings>
<endpoint address="" bindingConfiguration="StreamedRequestWebBinding" behaviorConfiguration="web" binding="webHttpBinding"
contract="DatingService.IRegisterService1" />
<system.web>
<compilation debug="true" targetFramework="4.0" />
<httpRuntime executionTimeout="240" maxRequestLength="10240" />
<pages validateRequest="false" />
</system.web>
做出上述更改後,我能夠上傳4MB的最大的,雖然我已經給最大允許大小10MB。我們還沒有將應用程序移植到IIS,並僅從Visual Studio進行測試。我哪裏做錯了? Pl建議
嘗試提高maxItemsInObjectGraph財產。另外我想上面是你的服務器端配置條目。您是否也在客戶端設置了相同的readerQuotas和httRuntime maxRequestLenght屬性? – Rajesh 2012-07-16 16:53:07