晨风

-------------------- 业精于勤,荒于嬉;行成于思,毁于随

导航

post请求数据量过大,提交失败

Posted on 2017-08-08 14:41  shenyixin  阅读(2522)  评论(0编辑  收藏  举报

HttpRuntimeSection.MaxRequestLength 属性,请求的最大大小(以千字节为单位)。 默认大小为 4096 KB (4 MB)

<system.web>  
  
  <httpRuntime  maxrequestLength="2097152" executionTimeout="3600"/>  <!--maxRequestLength就是文件的最大字符数,最大值不能超过2个G左右,executionTimeout是超时时间-->  
  
   <compilation debug="true" targetFramework="4.0" />  
 </system.web>  

MaxAllowedContentLength属性,以字节为单位,您想要启用附件的大小。默认 30000000B,约30M。

<security>
      <requestFiltering>
        <!--限制上传大小为2G-->
        <requestLimits maxAllowedContentLength="2147483647" />
      </requestFiltering>      
    </security>