利用ASP.NET控件中的asp:FileUpload控件时,有时候需要上传大容量的文件,可是默认情况下,上传文件的最大容量为4兆。如何实现?
只要在配置文件中改变两个默认设置即可:httpRuntime下的maxRequestLength和requestLengthDiskThreshold.前者规定了上传的最大容量值,后者设定缓存的大小。
如:
<configuration>
    <system.web>
       ...
       <httpRuntime maxRequestLength=”上传文件最大值" requestLengthDiskThreshold=”缓存大小" />
       ...
    </system.web>
</configuration>

相关文章:

  • 2021-11-19
  • 2021-10-27
  • 2022-12-23
  • 2022-12-23
  • 2021-11-10
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-25
  • 2021-11-06
  • 2021-08-11
  • 2022-12-23
  • 2021-07-07
  • 2021-06-23
相关资源
相似解决方案