1.在<system.web>节点内配置

<httpRuntime executionTimeout="3600" maxRequestLength="1048576" requestValidationMode="2.0"/>

属性说明:

executionTimeout:超时时间,单位:秒

maxRequestLength:允许上传文件大小,单位:KB。默认上传的文件大小为4M,超出报错。

requestValidationMode="2.0":必要,否则报错:Internal Server Error

 

2.在<system.webServer>节点内配置

    <security>  
      <requestFiltering allowDoubleEscaping="true">            
          <requestLimits maxAllowedContentLength="1073741824"></requestLimits>  
      </requestFiltering>  
    </security>

属性说明:

maxAllowedContentLength:允许上传文件大小,单位:B。默认上传的文件大小为30M,超出报错。最多支持4GB(4294967295)

相关文章:

  • 2021-09-15
  • 2022-12-23
  • 2021-09-10
  • 2021-10-05
  • 2022-12-23
  • 2021-09-12
  • 2021-11-20
猜你喜欢
  • 2021-09-22
  • 2021-11-20
  • 2021-10-02
  • 2022-12-23
  • 2022-02-11
  • 2022-12-23
相关资源
相似解决方案