廣告:
一臺客戶服務器:IIS中上傳文件提示:(413) Request Entity Too Large
但Web.Config中已經(jīng)設置了文件大小,上傳的文件也遠小于設置的大小。
最終解決方案:
編輯C:\Windows\System32\inetsrv\config下的applicationHost.config文件,找到自己項目的location項,在system.webServer下添加如下代碼:
<serverRuntime uploadReadAheadSize="104857600" />
uploadReadAheadSize單位為(B:bytes),這里104857600 = 100M,實際大小按需求設置。
<location path="EMWeb"> <system.webServer> <serverRuntime uploadReadAheadSize="104857600" /> </system.webServer> </location>
或者臨時解決辦法:重啟服務器或者重啟后臺即可。
廣告: