5

I continue to get an error (sometimes) when provisioning a web using CSOM. According to this MSDN article, this error is returned when the CSOM request exceeds 2MB. I watched the call in Fiddler and the request is not greater that 2MB. What could the problem be? Below is the code and request/response from fiddler:

   using (ClientContext cc = new ClientContext(url))
    {

       cc.Credentials = new SharePointOnlineCredentials(username, password);

       WebCreationInformation information = new WebCreationInformation();
       information.WebTemplate = "CMSPUBLISHING#0";
       information.Description = "My New Site";
       information.Title = "My New Site";
       information.Url = "newsite";
       // Currently all English, could be extended to be configurable based on language pack usage
        information.Language = 1033;
        information.UseSamePermissionsAsParentSite = false;

        cc.Web.Webs.Add(information);
        cc.ExecuteQueryRetry();
}

Fiddler Request:

<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName=".NET Library" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="1158" ObjectPathId="1157" /><ObjectIdentityQuery Id="1159" ObjectPathId="1157" /></Actions><ObjectPaths><Method Id="1157" ParentId="923" Name="Add"><Parameters><Parameter TypeId="{8f9e9fbe-189e-492f-884f-98f9ef9cc4d6}"><Property Name="Description" Type="String"></Property><Property Name="Language" Type="Int32">1033</Property><Property Name="Title" Type="String">Manuals</Property><Property Name="Url" Type="String">manuals</Property><Property Name="UseSamePermissionsAsParentSite" Type="Boolean">false</Property><Property Name="WebTemplate" Type="String">CMSPUBLISHING#0</Property></Parameter></Parameters></Method><Property Id="923" ParentId="384" Name="Webs" /><Identity Id="384" Name="7e19049d-e009-2000-008d-b659834a548f|740c6a0b-85e2-48a0-a494-e0f1759d4aa7:site:a43f2ef7-f1aa-423a-ad26-59b66edef6bb:web:a30643dc-7034-47ae-b87e-119ef8a2975d" /></ObjectPaths></Request>

Fiddler Response:

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8
Vary: Accept-Encoding
Server: Microsoft-IIS/8.5
X-SharePointHealthScore: 0
X-SP-SERVERSTATE: ReadOnly=0
SPClientServiceRequestDuration: 7513
X-AspNet-Version: 4.0.30319
SPRequestGuid: 7e19049d-601e-2000-008d-b31e125c7e26
request-id: 7e19049d-601e-2000-008d-b31e125c7e26
X-RequestDigest: 0x1B109C2C5737406AB9E9A2983D743443F86CEF7D92CD6041BB1510FCDD2A4866A55C5BF0D32E4E55C4448C12C9727F191740AAF929E6353320C1CAE0FBBC1D16,07 May 2015 17:27:33 -0000
X-FRAME-OPTIONS: SAMEORIGIN
X-Powered-By: ASP.NET
MicrosoftSharePointTeamServices: 16.0.0.4021
X-Content-Type-Options: nosniff
X-MS-InvokeApp: 1; RequireReadOnly
P3P: CP="ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI"
Date: Thu, 07 May 2015 17:27:40 GMT
Content-Length: 574

[
{
"SchemaVersion":"15.0.0.0","LibraryVersion":"16.0.4021.1200","ErrorInfo":{
"ErrorMessage":"Provisioning did not succeed. Details: Failed to initialize some site properties for Web at Url: 'https:\u002f\u002fslalomdev123.sharepoint.com\u002fsites\u002fPaulDev\u002fcompany\u002fACS\u002fmanuals' OriginalException: The request uses too many resources.","ErrorValue":null,"TraceCorrelationId":"7e19049d-601e-2000-008d-b31e125c7e26","ErrorCode":-2146232832,"ErrorTypeName":"Microsoft.SharePoint.SPException"
},"TraceCorrelationId":"7e19049d-601e-2000-008d-b31e125c7e26"
}
]
0

What's fiddler showing up in the responder||JSON||Tab?

Using PowerShell it is possible to check your web application parameters and tweak them as describes this blog: SharePoint Exception: The request uses too many resources

at the same time monitor your server and control that have a enough memory and CPU power to complete the request.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.