IIS7傳大于30M的視頻時(shí),出現(xiàn)找不到文件或目錄錯(cuò)誤的解決辦法
這個(gè)情況是出現(xiàn)在使用iis7的系統(tǒng)上的,因?yàn)閕is7限制了上傳文件大小,默認(rèn)允許最大上傳30M。
解決辦法:
修改IIS_schema.xml這個(gè)文件要先獲得這個(gè)文件的控制權(quán);
進(jìn)入目錄C:WindowsSystem32inetsrvconfigschema,修改文件IIS_schema.xml 權(quán)限:
進(jìn)入IIS_schema.xml文件權(quán)限修改,選擇”高級(jí)”
選擇”所有者”
選中 administrators 確定
再進(jìn)入權(quán)限編輯,修改administrators 完全控制.
再去掉IIS_schema.xml的只讀屬性.
修改文件配置:
然后搜索 3000000 意思是 只允許上傳 30MB 大小的文件,你在這后面多加一個(gè)0 就變成了 300MB 了就應(yīng)該夠用了。然后重啟 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行左右.