我正在尝试上传大小为 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>
以上设置基于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/