【问题标题】:The page was not displayed because the request entity is too large.When Download a 10Gb ZIP file由于请求实体太大,页面未显示。当下载 10Gb ZIP 文件时
【发布时间】:2014-10-10 11:46:27
【问题描述】:

虽然使用 c# 下载大 zip 文件大小为 10GB。我收到类似的错误 '页面未显示,因为请求实体太大。' 我已经在 iis 和

中获得了 app 命令
  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>

【问题讨论】:

    标签: c# asp.net iis iis-7


    【解决方案1】:

    maxReceivedMessageSize 以字节为单位。

    您指定了 10MB 而不是 10GB,您可以将其更改为 10 * 1024 * 1024 * 1024

     <binding maxReceivedMessageSize="10737418240">
    

    但这行不通due to a limit as described here

    【讨论】:

    • 嗨,我给了 appcmd.exe set config -section:system.webserver/serverruntime /uploadreadaheadsize:12884901888 /commit:apphost 但我收到错误
    • @thumbunkeys:C:\Windows\System32\inetsrv>appcmd.exe 设置配置 "SCS WEB 1234" -section:system .webServer/serverRuntime /uploadReadAheadSize:"12884901888" /commit:apphost 错误 (消息:无法将属性“uploadReadAheadSize”设置为值“1288490188 8”。原因:不是有效的无符号整数。)
    • 对错误消息的简单搜索得到了这个stackoverflow.com/questions/4022434/…
    • 如果我有 10gb 文件意味着我该如何下载
    猜你喜欢
    • 1970-01-01
    • 2020-03-06
    • 2021-11-16
    • 2014-05-10
    • 2011-09-28
    • 1970-01-01
    • 2019-03-17
    • 2017-01-11
    • 1970-01-01
    相关资源
    最近更新 更多