2012-10-30 20 views
3

第二節還有類似的問題:How to set the maxAllowedContentLength to 500MB while running on IIS7?如何更改IIS 7.0的maxAllowedContentLength?

不同的是,我已經在大小修改了我的web.config接受文件高達2 GB,不過,當嘗試和上傳大文件時,我收到以下錯誤:

The request filtering module is configured to deny a request that exceeds the length of the content.

web.config是這樣的:

<?xml version="1.0" encoding="utf-8"?> 
<configuration> 
    <system.web> 
     <httpRuntime executionTimeout="999999" maxRequestLength="2097151"/> 
     <customErrors mode="Off"/>  
     <compilation debug="true" strict="false" explicit="true" targetFramework="4.0" /> 
      <membership> 
      <providers> 
      <clear/> 
      </providers> 
     </membership> 
     <profile> 
      <providers> 
      <clear/> 

      </providers> 
     </profile> 
     <roleManager enabled="false"> 
      <providers> 
      <clear/> 

      </providers> 
     </roleManager> 
</system.web> 
<system.webServer> 
    <security> 
     <requestFiltering> 
      <requestLimits maxAllowedContentLength="2097151" /> 
     </requestFiltering> 
    </security> 
</system.webServer> 

我仍然收到錯誤,當我嘗試上傳文件時,它只是131 MB

那麼,我應該在maxAllowedContentLength設置中設置什麼讓人們上傳100 MB以上的文件呢?

回答

0

類型INETMGR在Windows中運行(WINKEY + R) 點擊右側面板中左側面板上,你的服務器名IIS部分雙擊請求篩選。在最右邊的面板上單擊編輯功能設置...。在請求限制部分,您可以更改maxAllowedContentLength

如果你想改變maxAllowedContentLength只是在你的網站之一,在左側面板中選擇您的站點下網站和同路如上去改變它。