Open panuoksala opened 1 year ago
For more information: The app is hosted at Azure App Service and it has relatively high traffic (multiple calls/sec). When the app is starting it will most likely receive an immediate call that creates the controller. That's made me wonder about possible LazyInitialize problem and race condition.
We use "key vault" as value for app.config values that are stored into Azure KeyVault. Parameter name: connectionString refers to ServiceBusConnectionStringBuilder class from Microsoft.Azure.ServiceBus library.
Looks like you're still on the 2.0 config builders. This might be #140, which should be fixed in the 3.0 release.
We are using Microsoft.Configuration.ConfigurationBuilders.AzureKeyVaultConfigBuilder in a .NET Framework 4.8 Web API project. Normally everything works, but sometimes (randomly) our application fails to get secret from KeyVault. I think this is related to constructor/static/locking, because it happens mostly at Controller constructor. For example we have a class that is registered into Autofac DI container and that class tries to read connectionstring from KeyVault at constructor. This class is constructured at API Controller constructor.
Sometimes that line creates following error:
Error Call Stacks
Could we call something at startup to ensure that everything is properly loaded, before starting to initialize DI container?