我用的windows server2016同样适用。
转载自https://jingyan.baidu.com/article/624e74594c678e34e8ba5aff.html
本文以win2012下的IIS8.0为例。
1.鼠标移至桌面最最左下角,弹出开始菜单,点击左键。

2.点击iis管理器,并选中您的网站。

3.点击“管理”下的“配置编辑器”。

4.设置上传超时时间限制。
点击下拉菜单节(S),选中system.web>httpRuntime
将executionTimeout的值设为00:30:00(即30分钟)

5.设置上传文件大小限制。
点击下拉菜单节(S),选中system.webServer>security>requestFiltering
展开requestlimits,将maxAllowedContentLength的值设为102400000(即100m)
注:这样修改直接就能生效,无需重启iis或者服务器。

6.
也可以直接在网站根目录建一个web.config文件,用此方法可以直接省略前5步,web.config内容具体如下
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="102400000" />
</requestFiltering>
</security>
</system.webServer>
<system.web>
<httpRuntime executionTimeout="1800" />
</system.web>
</configuration>


本文指导如何在Windows Server 2016的IIS8.0上设置上传文件大小和超时限制,包括使用配置编辑器和web.config文件的方法,无需重启服务器。
1万+

被折叠的 条评论
为什么被折叠?



