2014-10-10 12 views
0

使用c#下載大型zip文件時,大小爲10GB。我遇到錯誤,如 '該頁面未顯示,因爲請求實體太大。' 我已經給我在IIS和應用程序命令頁面未顯示,因爲請求實體太大。當下載10Gb ZIP文件時

appcmd.exe set config -section:system.webserver/serverruntime /uploadreadaheadsize: 1048576 /commit:apphost 

,我已經改變了配置文件

<system.serviceModel> 
    <bindings> 
     <basicHttpBinding> 
     <binding maxReceivedMessageSize="10485760"> 
      <readerQuotas ... /> 
     </binding> 
     </basicHttpBinding> 
    </bindings> 
    </system.serviceModel> 

回答

2

maxReceivedMessageSize是以字節爲單位。

您指定10MB,而不是10GB,你可以將其更改爲10 * 1024 * 1024 * 1024

<binding maxReceivedMessageSize="10737418240"> 

但是,這是行不通的due to a limit as described here

+0

嗨我給appcmd.exe設置config -section:system.webserver/serverruntime/uploadreadaheadsize:12884901888/commit:apphost但我收到錯誤 – arun 2014-10-10 12:12:58

+0

它是什麼錯誤? – thumbmunkeys 2014-10-10 12:13:21

+0

@thumbunkeys:C:\ Windows \ System32 \ inetsrv> appcmd.exe set config「SCS WEB 1234」-section:system .webServer/serverRuntime/uploadReadAheadSize:「12884901888」/ commit:apphost ERROR(message:Can not set屬性「uploadReadAheadSize」值爲「1288490188 8」..原因:不是一個有效的無符號整數 。) – arun 2014-10-10 12:22:40