在asp.net MVC中上传大文件时出现HTTP错误404.13 - 未找到

Ant*_*ier 1 c# asp.net-mvc file-upload web-config

我希望我的Web应用程序在服务器上上传大zip文件.这是我的代码逻辑:

@using (Html.BeginForm("AddApplication", "Admin", FormMethod.Post, new { enctype = "multipart/form-data", @class = "form-horizontal", role = "form" }))
{
    <div class="form-group">
        <span>PUT FILE HERE : <input style="min-width: 550px;" type="file" name="zippedApp" /></span>
    </div>
}
Run Code Online (Sandbox Code Playgroud)

在后台c#代码中:

  [HttpPost]

  public ActionResult AddApplication( string description, HttpPostedFileBase zippedApp)
  {
     //code
  }
Run Code Online (Sandbox Code Playgroud)

没有达到C#功能......在它进入我拥有的功能之前:

HTTP错误404.13 - 未找到

所以我读到了这个:

IIS7 - 当请求参数的大小超过30mb时,Webrequest以404.13失败

它让我觉得没有人真正知道答案.因为在我的情况下我确定它与MVC web.Config有关.

<httpRuntime targetFramework="4.5.2" maxRequestLength="102400" executionTimeout="6000" />在可以找到的每个配置中添加了一堆......但还没有成功.

Spe*_*pin 6

您还需要为IIS7 +添加此项

<system.webServer>
    <security>
      <requestFiltering>
        <requestLimits maxAllowedContentLength="52428800" /> <!--50MB-->
     </requestFiltering>
    </security>   
</system.webServer>
Run Code Online (Sandbox Code Playgroud)