Config builder fails on production but works on dev

James 0 Reputation points
2023-05-10T15:09:37.0133333+00:00

Hello I have an angular site and I am trying to store my connection strings in the azure key vault and retrieve them in my web.config file. With my current set up it works locally. It also works when I deploy to our dev web app. When I deploy to the production web app it does not work and I get a yellow screen with the following output. I think it is an azure issue, but I am unsure how to fix it.

[AmbiguousMatchException: Multiple custom attributes of the same type found.]
   System.Attribute.GetCustomAttribute(Assembly element, Type attributeType, Boolean inherit) +109
   System.Runtime.InteropServices.RuntimeInformation.get_FrameworkDescription() +87
   Azure.Core.TelemetryDetails.GenerateUserAgentString(Assembly clientAssembly, String applicationId) +166
   Azure.Core.TelemetryDetails..ctor(Assembly assembly, String applicationId) +66
   Azure.Core.Pipeline.HttpPipelineBuilder.CreateTelemetryPolicy(ClientOptions options) +56
   Azure.Core.Pipeline.HttpPipelineBuilder.BuildInternal(ClientOptions options, HttpPipelinePolicy[] perCallPolicies, HttpPipelinePolicy[] perRetryPolicies, HttpPipelineTransportOptions defaultTransportOptions, ResponseClassifier responseClassifier) +285
   Azure.Identity.CredentialPipeline..ctor(TokenCredentialOptions options) +125
   Azure.Identity.<>c.<.cctor>b__19_0() +79
   System.Lazy`1.CreateValue() +413
   System.Lazy`1.LazyInitValue() +372
   System.Lazy`1.get_Value() +133
   Azure.Identity.CredentialPipeline.GetInstance(TokenCredentialOptions options) +51
   Azure.Identity.DefaultAzureCredential..ctor(DefaultAzureCredentialOptions options) +37
   Microsoft.Configuration.ConfigurationBuilders.AzureKeyVaultConfigBuilder.LazyInitialize(String name, NameValueCollection config) +523
   Microsoft.Configuration.ConfigurationBuilders.KeyValueConfigBuilder.EnsureInitialized() +92
   Microsoft.Configuration.ConfigurationBuilders.KeyValueConfigBuilder.GetValueInternal(String key) +77

[Exception: Error in Configuration Builder 'AzureKeyVault'::GetValue(aspnet:PortableCompilationOutput)]
   Microsoft.Configuration.ConfigurationBuilders.KeyValueConfigBuilder.GetValueInternal(String key) +429
   Microsoft.Configuration.ConfigurationBuilders.KeyValueConfigBuilder.ProcessConfigurationSection(ConfigurationSection configSection) +207
   System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigurationBuilderHost.ProcessConfigurationSection(ConfigurationSection configSection, ConfigurationBuilder builder) +22
   System.Configuration.Internal.DelegatingConfigHost.ProcessConfigurationSection(ConfigurationSection configSection, ConfigurationBuilder builder) +20
   System.Configuration.BaseConfigurationRecord.CallHostProcessConfigurationSection(ConfigurationSection configSection, ConfigurationBuilder configBuilder) +50
Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,135 questions
{count} votes