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 AfterWebDialog(Session session) { try { return(WebsiteCustomAction.AfterWebDialog(session)); } catch (Exception ex) { session.ShowErrorMessage(ex); throw ex; } }
public static ActionResult RemoveWebsite(Session session) { try { return(WebsiteCustomAction.RemoveWebsite(session)); } catch (Exception ex) { session.ShowErrorMessage(ex); throw ex; } }
public static ActionResult AfterInstallInitialize_WEB(Session session) { try { return(WebsiteCustomAction.AfterInstallInitialize_WEB(session, new string[] { "PatchPersonMasterDatabase" })); } catch (Exception ex) { session.ShowErrorMessage(ex); throw ex; } }
public static ActionResult AppSearch_WEB(Session session) { try { return(WebsiteCustomAction.AppSearch_WEB(session)); } catch (Exception ex) { session.ShowErrorMessage(ex); throw ex; } }
public static ActionResult CreateWebsite(Session session) { try { var webInstallationOptions = GetWebInstallationOptions(session); return(WebsiteCustomAction.DeployWebsite(session, webInstallationOptions)); } catch (Exception ex) { session.ShowErrorMessage(ex); throw ex; } }
public static ActionResult AfterInstallInitialize_WEB(Session session) { try { string[] extraCustomActionNames = new string[] { "InstallBackendService", "RollbackBackendService", "UnInstallBackendService", "SetCprBrokerUrl", "CloneDataProviderSectionsToBackendService" }; return(WebsiteCustomAction.AfterInstallInitialize_WEB(session, extraCustomActionNames)); } 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; } }
public static ActionResult CreateWebsite(Session session) { try { var allOptions = new Dictionary <string, WebInstallationOptions>(); Dictionary <string, string> connectionStrings = new Dictionary <string, string>(); connectionStrings["CprBroker.Config.Properties.Settings.CprBrokerConnectionString"] = DatabaseSetupInfo.CreateFromFeature(session, "CPR").CreateConnectionString(false, true); WebInstallationOptions cprOptions = new WebInstallationOptions() { EncryptConnectionStrings = true, ConnectionStrings = new Dictionary <string, string>(connectionStrings), InitializeFlatFileLogging = true, WebsiteDirectoryRelativePath = EventBrokerCustomActions.PathConstants.CprBrokerWebsiteDirectoryRelativePath, ConfigSectionGroupEncryptionOptions = new ConfigSectionGroupEncryptionOptions[] { new ConfigSectionGroupEncryptionOptions() { ConfigSectionGroupName = Constants.DataProvidersSectionGroupName, ConfigSectionEncryptionOptions = new ConfigSectionEncryptionOptions[] { new ConfigSectionEncryptionOptions() { SectionName = DataProviderKeysSection.SectionName, SectionType = typeof(DataProviderKeysSection), CustomMethod = config => DataProviderKeysSection.RegisterInConfig(config) }, new ConfigSectionEncryptionOptions() { SectionName = DataProvidersConfigurationSection.SectionName, SectionType = typeof(DataProvidersConfigurationSection), CustomMethod = null } } } } }; allOptions["CPR"] = cprOptions; connectionStrings["CprBroker.Config.Properties.Settings.EventBrokerConnectionString"] = DatabaseSetupInfo.CreateFromFeature(session, "EVENT").CreateConnectionString(false, true); WebInstallationOptions eventOptions = new WebInstallationOptions() { EncryptConnectionStrings = false, ConnectionStrings = connectionStrings, InitializeFlatFileLogging = true, WebsiteDirectoryRelativePath = EventBrokerCustomActions.PathConstants.EventBrokerWebsiteDirectoryRelativePath, ConfigSectionGroupEncryptionOptions = new ConfigSectionGroupEncryptionOptions[] { new ConfigSectionGroupEncryptionOptions() { ConfigSectionGroupName = Constants.DataProvidersSectionGroupName, ConfigSectionEncryptionOptions = new ConfigSectionEncryptionOptions[] { new ConfigSectionEncryptionOptions() { SectionName = DataProviderKeysSection.SectionName, SectionType = typeof(DataProviderKeysSection), CustomMethod = config => DataProviderKeysSection.RegisterInConfig(config) }, new ConfigSectionEncryptionOptions() { SectionName = DataProvidersConfigurationSection.SectionName, SectionType = typeof(DataProvidersConfigurationSection), CustomMethod = null } } } } }; allOptions["EVENT"] = eventOptions; return(WebsiteCustomAction.DeployWebsite(session, allOptions)); } catch (Exception ex) { session.ShowErrorMessage(ex); throw ex; } }
public void AddUrlToLocalIntranet_Valid_Passes( [ValueSource("RandomUrls")] string url) { WebsiteCustomAction.AddUrlToLocalIntranet(url); }