diff --git a/src/ServiceControl.Audit/Infrastructure/Settings/ConfigFileSettingsReader.cs b/src/ServiceControl.Audit/Infrastructure/Settings/ConfigFileSettingsReader.cs index 8a87004149..3e4bf6ecc7 100644 --- a/src/ServiceControl.Audit/Infrastructure/Settings/ConfigFileSettingsReader.cs +++ b/src/ServiceControl.Audit/Infrastructure/Settings/ConfigFileSettingsReader.cs @@ -24,9 +24,11 @@ public static bool TryRead(string root, string name, out T value) { var fullKey = $"{root}/{name}"; - if (ConfigurationManager.AppSettings[fullKey] != null) + var appSettingValue = ConfigurationManager.AppSettings[fullKey]; + if (appSettingValue != null) { - value = (T)Convert.ChangeType(ConfigurationManager.AppSettings[fullKey], typeof(T)); + appSettingValue = Environment.ExpandEnvironmentVariables(appSettingValue); + value = (T)Convert.ChangeType(appSettingValue, typeof(T)); return true; }