.Net 上传文件过大失败

来源地址:https://www.cnblogs.com/ladyzhu/p/10060681.html

 

跟system.web同一级别,增加一个上传文件大小限制

system.webServer

 

  <!--上传文件大小限制-->
  <system.webServer>
    <security>
      <requestFiltering >
        <requestLimits maxAllowedContentLength="1073741824" ></requestLimits>
      </requestFiltering>
    </security>
  </system.webServer>
  <system.web>
    <customErrors mode="On" />
    <httpModules>
      <add name="FineUIMvcScriptModule" type="FineUIMvc.ScriptModule, FineUIMvc" />
    </httpModules>
    <httpHandlers>
      <add verb="GET" path="res.axd" type="FineUIMvc.ResourceHandler, FineUIMvc" />
    </httpHandlers>
    <compilation debug="true" targetFramework="4.7.2" />
    <httpRuntime targetFramework="4.5" maxRequestLength="81920" executionTimeout="120" />
 
    
    <!--设置Session过期时间-->
    <sessionState mode="InProc" timeout="1440" />
  </system.web>

 

posted @ 2019-09-20 09:27  Alex_Mercer  阅读(197)  评论(0)    收藏  举报