iis7 上傳大文件限制的真正解決辦法
修改IIS_schema.xml這個文件要先獲得這個文件的控制權;
進入目錄C:/Windows/System32/inetsrv/config/schema,修改文件IIS_schema.xml 權限:
進入IIS_schema.xml文件權限修改,選擇”高級”
選擇”所有者”
選中 administrators 確定
再進入權限編輯,修改administrators 完全控制.
再去掉IIS_schema.xml的只讀屬性.
修改文件配置:
然后搜索 3000000 意思是 只允許上傳 30MB 大小的文件,你在這后面多加一個0 就變成了 300MB 了就應該夠用了。然后重啟 IIS 7
代碼如下:
<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>
大約在1024行左右.
新聞熱點
疑難解答