zoukankan      html  css  js  c++  java
  • .net 文件上传大小的设置

    直接在配置文件web.config 中进行如下配置,主要需要明白的就是 配置的 单位是 Byte,  所以一定计算清楚,不然会在这里纠结很久!!!

    <configuration>
      <system.web>
        <compilation debug="true" targetFramework="4.5" />
        <!-- maxRequestLength 这里设置的单位是 B :  20480000 B = 20480KB = 20MB  -->
        <httpRuntime targetFramework="4.5" executionTimeout="90" maxRequestLength="20480000" useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100"/>
      </system.web>
      <!--这下面的不用配置,我自己测试过,但是如果只配置上面的不行,到可以都配置起-->
      <!--<system.webServer>
        <security>
          <requestFiltering>
            <requestLimits maxAllowedContentLength="204800000" />
          </requestFiltering>
        </security>
      </system.webServer>-->
    </configuration>
  • 相关阅读:
    C#泛型
    C#接口
    C#委托和事件
    Unity Ray 射线
    C#学习基础
    Graph | Eulerian path
    Careercup | Chapter 8
    Leetcode | Pow(x, n)
    Leetcode | Gray code
    分布式缓存
  • 原文地址:https://www.cnblogs.com/yougmi/p/5742003.html
Copyright © 2011-2022 走看看