public ActionResult ApplyProvisioningTemplate(ApplyProvisioningTemplateViewModel model)
        {
            AntiForgery.Validate();
            if (ModelState.IsValid)
            {
                // Prepare the Job to apply the Provisioning Template
                ApplyProvisioningTemplateJob job = new ApplyProvisioningTemplateJob();

                // Prepare all the other information about the Provisioning Job
                job.Owner = ClaimsPrincipal.Current.Identity.Name;
                job.ProvisioningTemplateUrl = model.ProvisioningTemplateUrl;
                job.TargetSiteUrl           = model.RelativeUrl;
                job.Title = String.Format("Application of Template \"{0}\" to Site \"{1}\" by {2}",
                                          job.ProvisioningTemplateUrl,
                                          job.TargetSiteUrl,
                                          job.Owner);

                model.JobId = ProvisioningRepositoryFactory.Current.EnqueueProvisioningJob(job);
            }

            return(View(model));
        }
        public ActionResult ApplyProvisioningTemplate()
        {
            ApplyProvisioningTemplateViewModel model = new ApplyProvisioningTemplateViewModel();

            return(View(model));
        }