Article ID: 2529243 - View products that this article applies to.
When you use SharePoint Client OM to upload files to SharePoint 2010 Document Library, uploading of files larger than 3 MB fail with the following error:
The remote server returned an error: (400) Bad Request.
Sample program used to upload file using SharePoint 2010 Client OM:
ClientContext clientContext = new ClientContext("http://server:10000/sites/testSite");
How to upload files with larger size, for example up to 1 GB or more, using Client Object Model in SharePoint 2010.
The default internal restrictions on file sizes and timeout settings halt uploading of larger files using Client Object Model in SharePoint.
At times you may see that the upload operation returns a timeout exception but this is critical only for very large file sizes which are close to 2 GB. Otherwise, it can be ignored using a try-catch block and you should see that the file got uploaded successfully.
(http://go.microsoft.com/fwlink/?LinkId=151500)for other considerations.
Article ID: 2529243 - Last Review: April 1, 2011 - Revision: 3.0