当前位置:首页 » 文件管理 » iis7上传大小

iis7上传大小

发布时间: 2025-01-11 09:41:38

㈠ 如何解决IIS7上传文件大小限制

IIS对上传文件大小有限制,IIS7 默认文件上传大小是30M,要李答突破这个限制需要做一下修改:
1.打开 %windir%\system32\inetsrv\config\applicationhost.config 找到: <requestFiltering>节点
这个节点默认没有 <requestLimits maxAllowedContentLength="上传大小的雀扰返值(单位:byte)" /> 元素,IIS 7和IIS 7.5上测试过 最大值只能是<requestLimits maxAllowedContentLength="4294967295" /> <4GB,
为这个节点新增如下事例元素:<requestLimits maxAllowedContentLength="2147483647" /> ,上传的大小将改为2G
注意:%windir%\system32\inetsrv\config\applicationhost.config 文件一定不要用其他机器的文件替换,否则IIS将无法启动 此文件记录了,当前IIS中所有Site , App pool的信息,还有一些与机器相关的配置。
2.修改web.config
<system.web>
<httpRuntime executionTimeout="36000" maxRequestLength="2097151"/>
<!--maxRequestLength:上传的大小,单位K ,executionTimeout:设置超时时间,单位:秒。(默认是90秒) -->
<顷饥/system.web>

3.web.config下如果有如下节点(此节点是为IIS 7设计的) ,则修改:
<requestLimits maxAllowedContentLength="2147483647" /> 单位与applicationhost.config中的<requestLimits maxAllowedContentLength="2147483647" />一致,它的最大值也只能为4294967295<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="2147483647" />
</requestFiltering>
</security>
</system.webServer>

㈡ 如何设置服务器iis上传文件大小

在IIS
6.0中设置文件上传大小的方法,就是配置如下节点:
复制代码
代码如下:

但在
IIS7
中,设置如上设置后,不管设置多大数值,最大上传了限制为30M
还要进行如下设置才能正确:
方法1:
appcmd
set
config
"My
Site/MyApp"
-section:requestFiltering
-requestLimits.maxAllowedContentLength:104857600
-commitpath:apphost
在IIS服务器的命令行执行如上命令,注意修改上面的
网站名称
和上传文件大小
方法2:
在web.config中加入如下配置:
复制代码
代码如下:

热点内容
和存储字长 发布:2025-05-15 21:54:09 浏览:514
用什么写c语言 发布:2025-05-15 21:35:56 浏览:418
linux读取u盘 发布:2025-05-15 21:32:13 浏览:508
c语言dos 发布:2025-05-15 21:18:17 浏览:664
sci编译英文 发布:2025-05-15 21:16:57 浏览:383
大猫如何设置密码 发布:2025-05-15 21:15:32 浏览:765
什么叫苹果版的和安卓版的手机 发布:2025-05-15 21:05:18 浏览:254
编程找点 发布:2025-05-15 20:43:10 浏览:588
php上传临时文件夹 发布:2025-05-15 20:43:00 浏览:658
impala数据库 发布:2025-05-15 20:42:12 浏览:650