zoukankan      html  css  js  c++  java
  • 怎样解决IIS6.0上传文件限制的问题?

    我们用IIS发布的Bs项目,如果进行文件上传,在上传文件的时候,无法上传文件大小超过4M的文件

    设置文件上传大小的方法,就是修改项目的web.config配置

    在项目中的web.config文件中,添加如下节点

     <system.web>
        <!-- maxRequestLength:解决上传文件4M限制 -->
        <httpRuntime maxRequestLength="999999" executionTimeout="50000"   />   
     </system.web>

    那么在IIS7.0这样设置后,无论maxRequestLength多大, 最大只能30M, 还要配置一下

    在web.config添加如下配置

     <system.web>
        <!-- maxRequestLength:解决上传文件4M限制 -->
        <httpRuntime maxRequestLength="999999" executionTimeout="50000"   />   
     </system.web>

    在加上

    <system.webServer>
         <security>
              <requestFiltering>
              <requestLimits maxAllowedContentLength="1048576000" />
              </requestFiltering>
         </security>
     </system.webServer> 

    Ps:

    IIS6.0 设置上传文件超过限制(4M),已解决本人上传文件限制问题,IIS7.0方法未测试,来源于:

    http://www.cnblogs.com/LifelongLearning/archive/2011/12/06/2278247.html

  • 相关阅读:
    正则表达式
    c#文件流
    css
    Flash笔记 快捷键
    .Net截取指定长度的汉字,其余用...表示的方法
    远程修改最新消息管理系统(JQuery版)
    远程修改最新消息管理系统
    kubernetes 1.6 集群实践 (一)
    创建kafak集群
    创建zookeeper集群
  • 原文地址:https://www.cnblogs.com/xielong/p/7565444.html
Copyright © 2011-2022 走看看