Skip to content

Instantly share code, notes, and snippets.

@luismanez
Created April 21, 2017 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luismanez/3a04132f2ef201b4b34da1a57caeb8e4 to your computer and use it in GitHub Desktop.
Save luismanez/3a04132f2ef201b4b34da1a57caeb8e4 to your computer and use it in GitHub Desktop.
Web web = parentWeb.Webs.Add(newWeb);
context.ExecuteQueryRetry();
Podemos añadir el siguiente snippet:
if (template.ExtensibilityHandlers.Any())
{
// Clone Context pointing to Sub Site (needed for calling custom Extensibility Providers from the pnp template passing the right ClientContext)
string newWeburl = web.EnsureProperty(w => w.Url);
ClientContext webClientContext = context.Clone(newWeburl);
web = webClientContext.Web;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment