2012-10-30 19 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只是在你的网站之一,在左侧面板中选择您的站点下网站和同路如上去改变它。