Fixed: The request message is too big. The server does not allow messages larger than 2097152 bytes while uploading attachment using CSOM in SharePoint 2013

Got below error while uploading document to SharePoint folder.

Following PowerShell script can be used to increase the limit.

$ws = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$ws.ClientRequestServiceSettings.MaxReceivedMessageSize = 5242880
$ws.ClientRequestServiceSettings.MaxParseMessageSize  = 5242880
$ws.Update()

https://msdn.microsoft.com/en-us/library/office/ff599489%28v=office.14%29.aspx

Hope it helps !


Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

1 thought on “Fixed: The request message is too big. The server does not allow messages larger than 2097152 bytes while uploading attachment using CSOM in SharePoint 2013”

  1. HI Nishant,

    Am using office 365 SharePoint. Am facing an issue with client object model.
    Error Text: The request message is too big. The server does not allow messages larger than 2097152 bytes.

    I google it every one is saying run power-shell script to increase the document upload size.

    Could you please help me how to achieve this for office 365 SharePoint .

    Thanks in adanced

    Like

Share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s