web.config设置工作不超过1 GB

问题描述:

我想上传csv文件大小为1.10 GB接受文件的大小,我想允许用户上传的文件多达大小10 GBweb.config设置工作不超过1 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

上面的设置都是基于​​。

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

+0

请问您可以检查此链接。 [http://*.com/questions/4022434/how-to-set-the-maxallowedcontentlength-to-500mb-while-running-on-iis7][1] – Ilaria

增加值maxAllowedContentLengthmaxAllowedContentLength的最大值是4,294,967,295字节= 3,99GB。

您可以将其设置为最大3.99 GB。根据MSDNmaxAllowedContentLength有型号uint,其最大值是4,294,967,295字节= 3.99 GB