title: dropzone.js file upload Maximum request length exceeded
body: <p>I'm using dropzone and having trouble with uploading documents larger than 18MB. I keep recieving Maximum request length exceeded error and can't understand why. I have been researching this for a few days now and can't figure it out. Example of my configurations are below. Pulling what hair I have left out on this one. </p>
  
  <p>dropzone js code:</p>
  
  <pre><code>$("#dz-documents").dropzone({
              url: "/upload/UploadDocument",
              maxFiles: 1,
              maxFilesize: 500.0,
              addRemoveLinks: true,  //*** 2/19/15 RKH *** changed
              uploadMultiple: false,
              autoProcessQueue: true,
              paramName: links,
              height: '150px',
              dictResponseError: 'Error uploading file!',
              init: function () {
                  this.on("complete", function (file) {
                      if (this.getUploadingFiles().length === 0 &amp;&amp; this.getQueuedFiles().length === 0) {
                          this.removeFile(file);
  
                          // reload documents
                          Documents.loadDocuments($('#hdfObjectId').val(), $('#hdfRecordId').val())
  
                          Activity[0].refreshActivity($('#hdfObjectId').val(), $('#hdfRecordId').val())
                      }
                  });
              }
          });
  </code></pre>
  
  <p>c#: </p>
  
  <pre><code>[HttpPost]
      public async Task&lt;ActionResult&gt; UploadDocument()
      {
          try
          {
              // The Name of the Upload component is "files"
              if (Request.Files != null)
              {
                  OrganizationUser user = await ApplicationUserManager.GetOrganizationUser(User.Identity.GetUserId()); 
  
                  // snipped validation code
                  CloudStorageAccount storageAccount = CloudStorageAccount.Parse(Microsoft.Azure.CloudConfigurationManager.GetSetting("avnCloudStorage"));
  
                  foreach (string name in Request.Files)
                  {
                      HttpPostedFileBase file = Request.Files[name];
  
                      if (await docRepository.Save(file, Request.Files.AllKeys, user.OrganizationID, user.ID, user.UserID.Value.ToString()))
                      {
                          return Content("Upload was successful");
                      }
                      else
                      {
                          return Content("Error occurred on upload");
                      }
                  }
              }
  
              return Content("Error occurred on upload");
          }
          catch (Exception ex)
          {
              logger.Error(ex);
              throw ex;
          }
      }
  </code></pre>
  
  <p>web.config</p>
  
  <pre><code>&lt;system.webServer&gt;
  &lt;security&gt;
    &lt;requestFiltering&gt;
      &lt;requestLimits maxAllowedContentLength="2147483648" /&gt;
    &lt;/requestFiltering&gt;
  &lt;/security&gt;
  &lt;/system.webServer&gt;
  
  &lt;system.web&gt;
  &lt;runtime executionTimeout="240" maxRequestLength="2097152"&gt;
  &lt;system.web&gt;
  </code></pre>