var webCreationInfo = new SP.WebCreationInformation(); webCreationInfo.set_title(customerName); webCreationInfo.set_url(customerCode); webCreationInfo.set_webTemplate(templateId); customerWeb = web.get_webs().add(webCreationInfo); context.load(customerWeb); context.executeQueryAsync( Function.createDelegate(this, CreateSiteSucceeded), Function.createDelegate(this, ClientContextFailed));
The clientcontext is earlier instantiated in a separate function. The customercode, customername and template id are just variables with a value. When I execute the function, I get the following exception: "The request uses too many resources".
If I change the template to the standard team site like this:
Then I don't get exceptions.
I've read that this error could have something to do with exceeding the 2 mb request limit or exceeding the max number of objects paths which is 256 by default. This looks like a really basic operation to me. Why am I getting this error? Or how can I prevent it?