title: How to upload large files in asp.net core 2.0
body: <p>I am trying to upload large files, size is more than 28 mb (this is the default request size in .net core). I have reed a lot of articles and official documentation but without any luck. I have tried with html form:</p>
  
  <pre><code>&lt;form asp-action="Upload" asp-controller="Media" method="post" enctype="multipart/form-data"&gt;
     &lt;input type="file" name="files" multiple id="inputId" /&gt;
     &lt;button type="submit"&gt;Ok&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>and jQuery AJAX reuqest:</p>
  
  <pre><code>function uploadFiles(inputId) {
      var input = document.getElementById('inputId');
      var files = input.files;
      var formData = new FormData();
      for (var i = 0; i != files.length; i++) {
        formData.append("files", files[i]);
      }
      $.ajax({
        url: "/uploader",
        data: formData,
        processData: false,
        contentType: false,
        type: "POST",
        success: function (data) {
          alert("Files Uploaded!");
        }
      });
  };
  </code></pre>
  
  <p>My action looks like:</p>
  
  <pre><code> [DisableRequestSizeLimit]
   public class MediaController : Controller
   {
      [HttpPost]
      public async Task&lt;IActionResult&gt; Upload(IEnumerable&lt;IFormFile&gt; files)
      {
      }
   }
  </code></pre>
  
  <p>This is a part of my code, sorry if there is some type-o. When I run it locally, there is no problem, I am able to upload file large that 28mb., but when I published it on Azure Web App, I cannot upload file large than 28mb. and it throws 404.13 Error. Tried to change startup.cs and program.cs to add form options and request body size limits but without success. Then I tried different method, opened ftp and manually changed the web.config file (added some xml line of codes for request body size and etc.) After these changes, everything was working. After some days trying to figure it out by myself, decide to post a article with my problem. If some one has some solution, please share it.
  Thanks guys.</p>