Skip to content

Instantly share code, notes, and snippets.

@AsishP
Last active August 12, 2018 10:08
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save AsishP/e46853da5032e243aee27bae4422057a to your computer and use it in GitHub Desktop.
using (var ctx = new ClientContext(<site url>))
{
ctx.RequestTimeout = Timeout.Infinite;
Web web = ctx.Web;
ctx.Load(web, w => w.Title);
ctx.ExecuteQueryRetry();
ProvisioningTemplateApplyingInformation ptai
= new ProvisioningTemplateApplyingInformation
{
ProgressDelegate = delegate (String message, Int32 progress, Int32 total)
{
log.Info(String.Format("{0:00}/{1:00} - {2}", progress, total, message));
},
IgnoreDuplicateDataRowErrors = true
};
web.ApplyProvisioningTemplate(Template, ptai);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment