Sharepoint client Object Model "(400) Bad request" error

Source: Internet
Author: User

When you are usingMicrosoft. Sharepoint. Client. filecollection. AddMethod orMicrosoft. Sharepoint. Client. file. savebinaryWhen creating or modifying a file in the SharePoint library, you may encounter the error "the remote server returned an error: (400) Bad request. To solve this problem, you need to modify the default maximum Message Size of SharePoint.

Open the SharePoint 2010 management shell and execute the following command:

$ Ws = [microsoft. Sharepoint. Administration. spwebservice]: contentservice
$ Ws. clientrequestservicesettings. maxcompute edmessagesize = your_value
$ Ws. Update ()

We recommend that you set the size of maxcompute edmessagesize to int32.maxvalue-1, that is, 2147483646.

In general, you may need to force restart your IIS service. You can use the following command:

Iisreset/noforce

Or, you can also useMicrosoft. Sharepoint. Client. file. savebinarydirectMethod to upload files. This method does not limit the file size. For more information about how to use it, see my other article.Article"Notes about Sharepoint client object application ".

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.