public static ActionResult PatchWebsite(Session session) { try { Action patch_2_0 = () => { var webInstallationInfo = WebInstallationInfo.CreateFromFeature(session, "PM"); var webInstallationOptions = GetWebInstallationOptions(session); var configFilePath = webInstallationInfo.GetWebConfigFilePath(webInstallationOptions["PM"]); var dic = new Dictionary <string, string>(); dic["multipleSiteBindingsEnabled"] = "true"; CprBroker.Installers.Installation.AddSectionNode("serviceHostingEnvironment", dic, configFilePath, "system.serviceModel"); }; var infos = new Dictionary <string, WebPatchInfo[]>(); infos["PM"] = new WebPatchInfo[] { new WebPatchInfo() { Version = new Version(2, 0), PatchAction = patch_2_0 } }; return(WebsiteCustomAction.PatchWebsite(session, infos)); } catch (Exception ex) { session.ShowErrorMessage(ex); throw ex; } }
public static ActionResult PatchWebsite(Session session) { try { var featurePatchInfos = new Dictionary <string, WebPatchInfo[]>(); featurePatchInfos["CPR"] = new WebPatchInfo[] { new WebPatchInfo() { Version = new Version(1, 3), PatchAction = () => PatchWebsite_1_3_0(session) }, new WebPatchInfo() { Version = new Version(2, 1, 1), PatchAction = () => PatchWebsite_2_1_1(session) }, new WebPatchInfo() { Version = new Version(2, 2, 2), PatchAction = () => PatchWebsite_2_2_2(session) } }; featurePatchInfos["EVENT"] = new WebPatchInfo[] { new WebPatchInfo() { Version = new Version(2, 2), PatchAction = () => EventBrokerCustomActions.MoveBackendServiceToNewLocation(session) } }; return(WebsiteCustomAction.PatchWebsite(session, featurePatchInfos)); } catch (Exception ex) { session.ShowErrorMessage(ex); throw ex; } }