手抄报 安全手抄报 手抄报内容 手抄报图片 英语手抄报 清明节手抄报 节约用水手抄报

如何解除IIS的文件上传限制

时间:2024-10-13 11:19:02

1、首先在IIS中右键“本地计算机”选择“属性”,钩选“允许直接编辑配置数据库”。

2、然后依次打开“控制面板--管理工具--服务”,在其中右边找到“IIS Admin Service”,选中该项并点击鼠标右键,选中“停止”即可关闭该服务。

3、修改C:/Windows/System32/inetsrv/config/schema/IIS_schema.xml文件(修改该文件需要获得这个文件的控制权),找到maxAllowedContentLength, 其默认值为30000000,即30M,加一个0 就变成了 300MB 了就应该够用了,如果不起作用,则需要重启 IIS 7!修改之后如下:

4、 <element name="requestLimits"> <attribute 荏鱿胫协name="maxAllowedContentLength" type="uint" defaultValue="30000000" /> <attribute name="maxUrl" type="uint" defaultValue="4096" /> <attribute name="maxQueryString" type="uint" defaultValue="2048" /> <element name="headerLimits"> <collection addElement="add" clearElement="clear" removeElement="remove" > <attribute name="header" type="string" required="true" isUniqueKey="true" validationType="nonEmptyString" /> <attribute name="sizeLimit" type="uint" required="true" /> </collection> </element>

5、再修改web.config里面的<add key="CookieTimeOut" value="30&鳎溻趄酃quot; /> <add key="imageSize" value="-1" /> <add key="fileSize" value="10000" />(大小改这里) <add key="fileLimit" value="10" />

6、检查web.config的httpRuntime :<httpRuntime maxRequestLength="2097151" executionTimeout="50000" />

© 手抄报圈