zoukankan      html  css  js  c++  java
  • asp.net mvc Post上传文件大小限制

     最近发现在项目中使用jQuery.form插件上传比较大的文件时,上传不了,于是改了下web.config的上传文件最大限制。

    <configuration>  
        <system.web>  
            <httpRuntime maxRequestLength="102400" executionTimeout="200" enable="true" />
        </system.web>  
    </configuration>

     改完后还是不能上传,最后在stackoverflow找到了答案,原来还要配置服务端的最大文件限制。

    譬如限制最大文件为100M

    <configuration>  
        <system.web>  
            <httpRuntime maxRequestLength="102400" executionTimeout="200" enable="true" />
        </system.web>  
    </configuration>
    <system.webServer>  
       <security>  
          <requestFiltering>  
             <requestLimits maxAllowedContentLength="104857600" />  
          </requestFiltering>  
       </security>  
     </system.webServer> 

    stackoverflow答案地址:http://stackoverflow.com/questions/23327338/maxrequestlength-for-net-4-5-1-framework

  • 相关阅读:
    React学习笔记
    士兵杀敌(一)
    网络爬虫Java实现抓取网页内容
    德莱联盟
    计算球体积
    在页面上 获取键盘事件
    一起玩转mysql
    腾讯云 做出的 不错的 动画 chrome小插件
    jquery MD5
    json to xml
  • 原文地址:https://www.cnblogs.com/townsend/p/4070585.html
Copyright © 2011-2022 走看看