c# - Web.config 设置无法接受超过 1 GB 的文件大小

标签 c# asp.net angularjs asp.net-mvc file-upload

我正在尝试上传大小为 1.10 gb 的 csv 文件,我希望允许用户上传最大为 10 gb 的文件。

Web.config 设置:

<system.web>
    <authentication mode="None" />
    <compilation debug="true" targetFramework="4.5" />
    <httpRuntime maxRequestLength="10240000" targetFramework="4.5" /> <!-- this will file upload up to 10 gb-->
  </system.web>
 <system.webServer>
    <security>
      <requestFiltering>
        <requestLimits maxAllowedContentLength="10240000" /><!-- iis setting to handle file upload up to 10 gb-->
      </requestFiltering>
    </security>
    <modules>
      <remove name="FormsAuthentication" />
    </modules>
  </system.webServer>

错误:enter image description here

以上设置基于this reference .

我正在使用 ng-File Upload上传文件到服务器。

最佳答案

增加 maxAllowedContentLength 的值。 maxAllowedContentLength 的最大值为 4,294,967,295 字节 = 3,99 gb。

关于c# - Web.config 设置无法接受超过 1 GB 的文件大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41356598/

相关文章:

c# - excanvas js 在 IE8 中不工作

c# - 复选框文本 l 不适合其文本

c# - 只有最后一个单元格被添加到行

c# - 从 asp.net 页面调用存储过程返回在集合中找不到参数 <Column_Name>。

Asp.Net 如何获取正则表达式的字符串结果,而不仅仅是一个

javascript - 使用 javascript 获取 gridview 文本框值的总和并在标签中显示总计

C#:检索非参数化存储过程查询的输出参数?

javascript - 你如何使用 jasmine + TypeScript 测试一个用常量调用的函数

javascript - data-ng-class 中的函数没有被调用

javascript - 如何在 AngularJs 中使用正则表达式和 ng-repeat?