<system.webServer> 
	<security> 
		<requestFiltering> 
		<requestLimits maxAllowedContentLength="262144000" /> 
		</requestFiltering> 
	</security> 
</system.webServer> 

<system.web>
	<httpRuntime maxRequestLength="262144000" executionTimeout="20000"/>
</system.web>

  

ASP.NET为我们提供了文件上传服务器控件FileUpload,默认情况下可上传的最大文件为4M,如果要改变可上传文件大小限制,那么我们可以在web.config中的httpRuntime元素中添加maxRequestLength属性设置大小,同时为了支持大文件上传超时可以添加executionTimeout属性设置超时时间

 

相关文章:

  • 2021-10-02
  • 2021-10-02
  • 2022-12-23
  • 2021-06-29
  • 2021-10-28
  • 2021-06-28
  • 2021-10-02
  • 2021-10-03
猜你喜欢
  • 2022-01-26
  • 2021-06-17
  • 2021-11-25
  • 2022-12-23
  • 2022-12-23
  • 2021-10-02
相关资源
相似解决方案