zoukankan      html  css  js  c++  java
  • ASP.NET上传大文件的问题

    原文:http://www.cnblogs.com/wolf-sun/p/3657241.html?utm_source=tuicool&utm_medium=referral

    引言

    之前使用Uploadify做了一个上传图片并预览的功能,今天在项目中,要使用该插件上传大文件。之前弄过上传图片的demo,就使用该demo进行测试。可以查看我的这篇文章:[Asp.net]Uploadify所有配置说明,常见bug问题分析

    大文件上传

    第一步:修改web.config

    <configuration>
      <system.web>
        <compilation debug="true" targetFramework="4.5" />
        <!--maxRequestLength就是文件的最大字符数,最大值不能超过2个G左右,executionTimeout是超时时间--> 
        <httpRuntime targetFramework="4.5" maxRequestLength="1073741824" executionTimeout="3600" />
      </system.web>
    </configuration>

    第三步:添加system.webServer节点

     1 <configuration>
     2   <system.web>
     3     <compilation debug="true" targetFramework="4.5" />
     4     <!--maxRequestLength就是文件的最大字符数,最大值不能超过2个G左右,executionTimeout是超时时间-->
     5     <httpRuntime targetFramework="4.5" maxRequestLength="1073741824" executionTimeout="3600" />
     6   </system.web>
     7   <system.webServer>
     8     <security>
     9       <requestFiltering>
    10         <!--修改服务器允许最大长度-->
    11         <requestLimits maxAllowedContentLength="1073741824"/>
    12       </requestFiltering>
    13     </security>
    14   </system.webServer>
    15 </configuration>

    设置IIS

     打开IIS管理器,找到Default Web Site。先进行停止。

    在IIS中双击“请求筛选”打开。

    其中的允许的最大容量长度,默认是”30000000“,30M,将其修改为1073741824,即1G。

  • 相关阅读:
    Swift
    Swift
    Swift
    Swift
    iOS 判断某一日期是否在一日期区间
    iOS 本地推送通知
    iOS json解析中包含“ ”等解析出错
    iOS UILabel两侧加阴影
    IOS 设置ios中DatePicker的日期为中文格式
    [分享] 关于App Store下载到一半发生错误的问题 [复制链接]
  • 原文地址:https://www.cnblogs.com/huaan011/p/5106487.html
Copyright © 2011-2022 走看看