IIS配置文件上传大小限制

2018-08-28

IIS配置文件上传大小限制

问题:上传文件过大导致上传不了,直接在webconfig里做以下配置会导致程序出错,这个需要在IIS里配置

  <system.web>  
    <httpRuntime maxRequestLength="20480" targetFramework="4.5" />  
  </system.web>

步奏:

1、在iis里点开配置编辑器

2、在system.web/httpRuntime 节点下找到以下配置项,设置文件大小。(1M = 1024K)

 结果在webconfig里会多出该节点

  <system.web>  
    <httpRuntime maxRequestLength="20480" targetFramework="4.5" />  
  </system.web>
 

猜你喜欢

转载自www.cnblogs.com/i-mengli/p/9547682.html