public static void RemoveExtraEntries() { var environmentFactory = EnvironmentFactoryFactory.Create(); var settingOperations = environmentFactory.ManagementEnvironment.MgmtSettingOperations; SafeDeleteSetting(settingOperations, Setting.PrebuiltCompany); SafeDeleteSetting(settingOperations, Setting.PrebuiltService); SafeDeleteSetting(settingOperations, Setting.UserForPrebuiltEntity); settingOperations.Update(new Setting(Setting.ServiceProfile, ServiceProfile.ServiceProvider.ToString())); }
public static void Init() { var environmentFactory = EnvironmentFactoryFactory.Create(); var settingOperations = environmentFactory.ManagementEnvironment.MgmtSettingOperations; SafeEnsureSetting(settingOperations, Setting.ServiceProfile, ServiceProfile.ServiceProvider.ToString()); SafeEnsureSetting(settingOperations, Setting.EmailActivation, "false"); SafeEnsureSetting(settingOperations, Setting.TelemetrySetupServiceEndpoint, "http://localhost:12345/papi/v1/telemetryDataSinkSetup"); SafeEnsureSetting(settingOperations, Setting.TelemetrySetupServiceApiKey, Crypto.GenerateSafeRandomToken()); SafeEnsureSetting(settingOperations, Setting.MessagingServiceEndpoint, "http://localhost:12345/msvc/v1/messaging"); SafeEnsureSetting(settingOperations, Setting.MessagingServiceApiKey, Crypto.GenerateSafeRandomToken()); SafeEnsureSetting(settingOperations, Setting.WebsiteUrl, "http://localhost:12345"); SafeEnsureSetting(settingOperations, Setting.ManagementApiUrl, "http://localhost:12345/api/v1"); SafeEnsureSetting(settingOperations, Setting.PlatformApiUrl, "http://localhost:12345/papi/v1"); SafeEnsureSetting(settingOperations, Setting.PlatformWsUrl, "ws://localhost:8080"); SafeEnsureSetting(settingOperations, Setting.ReportingApiUrl, "http://localhost:12345/rapi/v1"); RemoveExtraEntries(); }