這個情況是出現在使用iis7的系統上的,因為iis7限制了上傳文件大小,默認允許最大上傳30M。
解決辦法:
修改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行左右.