title: C# SharePoint Error: The server does not allow messages larger than 2097152 bytes
body: <p>I am getting <em><strong>SharePoint Error: The server does not allow messages larger than 2097152 bytes error while uploading large file.</strong></em></p>
  <p>Can you please help me
  Below is my code:</p>
  <pre><code>        Folder currentRunFolder = site.GetFolderByServerRelativeUrl(barRootFolderRelativeUrl + &quot;/&quot; + newFolderName);
          FileCreationInformation newFile = new FileCreationInformation { Content = System.IO.File.ReadAllBytes(@p), Url = Path.GetFileName(@p), Overwrite = true };
          currentRunFolder.Files.Add(newFile);
          currentRunFolder.Update();
  
          context.ExecuteQuery();
  </code></pre>