diff --git a/src/Exceptionless.Core/Configuration/MessageBusOptions.cs b/src/Exceptionless.Core/Configuration/MessageBusOptions.cs index 4dc00110b1..b69407028f 100644 --- a/src/Exceptionless.Core/Configuration/MessageBusOptions.cs +++ b/src/Exceptionless.Core/Configuration/MessageBusOptions.cs @@ -26,7 +26,10 @@ public static MessageBusOptions ReadFromConfiguration(IConfiguration config, App options.Provider = options.Data.GetString(nameof(options.Provider)); string? providerConnectionString = !String.IsNullOrEmpty(options.Provider) ? config.GetConnectionString(options.Provider) : null; - options.ConnectionString = !String.IsNullOrEmpty(providerConnectionString) ? providerConnectionString : options.Data.BuildConnectionString(new HashSet { nameof(options.Provider) }); + if (!String.IsNullOrEmpty(providerConnectionString)) + options.Data.AddRange(providerConnectionString.ParseConnectionString()); + + options.ConnectionString = options.Data.BuildConnectionString(new HashSet { nameof(options.Provider) }); return options; } diff --git a/src/Exceptionless.Core/Configuration/MetricOptions.cs b/src/Exceptionless.Core/Configuration/MetricOptions.cs index 390cc328e6..d3875b5c19 100644 --- a/src/Exceptionless.Core/Configuration/MetricOptions.cs +++ b/src/Exceptionless.Core/Configuration/MetricOptions.cs @@ -20,7 +20,10 @@ public static MetricOptions ReadFromConfiguration(IConfiguration config) options.Provider = options.Data.GetString(nameof(options.Provider)); string? providerConnectionString = !String.IsNullOrEmpty(options.Provider) ? config.GetConnectionString(options.Provider) : null; - options.ConnectionString = !String.IsNullOrEmpty(providerConnectionString) ? providerConnectionString : options.Data.BuildConnectionString(new HashSet { nameof(options.Provider) }); + if (!String.IsNullOrEmpty(providerConnectionString)) + options.Data.AddRange(providerConnectionString.ParseConnectionString()); + + options.ConnectionString = options.Data.BuildConnectionString(new HashSet { nameof(options.Provider) }); return options; } diff --git a/src/Exceptionless.Core/Configuration/QueueOptions.cs b/src/Exceptionless.Core/Configuration/QueueOptions.cs index e24ff43a27..9ab058ca66 100644 --- a/src/Exceptionless.Core/Configuration/QueueOptions.cs +++ b/src/Exceptionless.Core/Configuration/QueueOptions.cs @@ -24,7 +24,10 @@ public static QueueOptions ReadFromConfiguration(IConfiguration config, AppOptio options.Provider = options.Data.GetString(nameof(options.Provider)); string? providerConnectionString = !String.IsNullOrEmpty(options.Provider) ? config.GetConnectionString(options.Provider) : null; - options.ConnectionString = !String.IsNullOrEmpty(providerConnectionString) ? providerConnectionString : options.Data.BuildConnectionString(new HashSet { nameof(options.Provider) }); + if (!String.IsNullOrEmpty(providerConnectionString)) + options.Data.AddRange(providerConnectionString.ParseConnectionString()); + + options.ConnectionString = options.Data.BuildConnectionString(new HashSet { nameof(options.Provider) }); return options; } diff --git a/src/Exceptionless.Core/Configuration/StorageOptions.cs b/src/Exceptionless.Core/Configuration/StorageOptions.cs index 4a082c742a..2c114e973d 100644 --- a/src/Exceptionless.Core/Configuration/StorageOptions.cs +++ b/src/Exceptionless.Core/Configuration/StorageOptions.cs @@ -26,7 +26,10 @@ public static StorageOptions ReadFromConfiguration(IConfiguration config, AppOpt options.Provider = options.Data.GetString(nameof(options.Provider)); string? providerConnectionString = !String.IsNullOrEmpty(options.Provider) ? config.GetConnectionString(options.Provider) : null; - options.ConnectionString = !String.IsNullOrEmpty(providerConnectionString) ? providerConnectionString : options.Data.BuildConnectionString(new HashSet { nameof(options.Provider) }); + if (!String.IsNullOrEmpty(providerConnectionString)) + options.Data.AddRange(providerConnectionString.ParseConnectionString()); + + options.ConnectionString = options.Data.BuildConnectionString(new HashSet { nameof(options.Provider) }); return options; }