windows 2008 server iis7 服务 上传文件大小限制(转于傻瓜路路的空间)

来源:互联网 发布:linux创建文件夹 权限 编辑:程序博客网 时间:2024/06/05 21:50

一、iis7 上传大文件限制的真正解决办法

修改IIS_schema.xml这个文件要先获得这个文件的控制权;
进入目录C:/Windows/System32/inetsrv/config/schema,修改文件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行左右.

二、IIS7.0的修改方法如下:

打开IIS管理器–双击“IIS”中的“ASP”– 打开“配置 ASP 应该程序的属性”–展开“限制属性”;
修改“最大请求实体主体限制”的值,默认值为200000(即不到200KB);
把它修改为你想修改的大小,如:52000000(50MB)。
修改完成点击“应用”OK!