wumai 发表于 2015-11-4 10:21:48

如何修改设置解除windows 7/2008/2012的iis上传限制

如何修改设置解除windows 7/2008/2012的iis上传限制

打开某一个网站或者点击根节点,在最下方的“管理”部分,选择“配置编辑器”
然后找到节点system.webServer/security/requestFiltering
将里面的requestlimits下的maxAllowedContentLength的值(原本为30000000,即30M)修改为102400000,即100M即可。
也可以直接更改配置文件,即C:\Windows\System32\inetsrv\config\schema\IIS_schema.xml
这个文件,但是考虑到安全等问题,而且这个文件默认是只读的,所以不建议直接修改这个配置文件。
再找到system.web/httpRuntime节点,修改下面的maxRequestLength为1024000,即100M

这样修改直接就能生效,无需重启iis或者服务器。
上传限制其实就是在这两处,一个IIS,一个asp.net,以上的修改可通过直接修改web.config来实现。
IIS中默认上传限制为30M,可通过下面方法,修改maxAllowedContentLength为100M
1234567<system.webServer>    <security>      <requestFiltering>            <requestLimitsmaxAllowedContentLength=&quot;1024000000&quot;/>      </requestFiltering>    </security></system.webServer>ASP.net中的上传限制默认为4M,通过修改maxRequestLength可改为100M
123<system.web>    <httpRuntimemaxRequestLength=&quot;1024000&quot;/></system.web>
页: [1]
查看完整版本: 如何修改设置解除windows 7/2008/2012的iis上传限制