首页 > 技术文章 > C# FormData 文件太大报错404 Form表单上传大文件,无法进入后台Action,页面提示404.

Kendy 2019-09-03 21:02 原文

web.config中添加如下节点

<system.webServer>

    <security>
      <requestFiltering >
        <requestLimits maxAllowedContentLength="1073741824" ></requestLimits>
      </requestFiltering>
    </security>

</system.webServer>.


和设置

<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" maxRequestLength="999999999" executionTimeout="120" maxQueryStringLength="2097151" />
<httpModules>
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" />
</httpModules>
</system.web>

推荐阅读