Reputation: 9659
When an ASP.NET MVC application is running as an Azure Web App, the WebConfigurationManager can pick up settings from both the Azure Portal Application Settings and from the web.config file, with the portal settings taking precedence.
Is there any way to check whether a particular setting has come from the portal or the web.config?
Upvotes: 0
Views: 131
Reputation: 43183
There is no clean way to tell. But if you're ok with a dirty/undocumented way (not guaranteed to work forever), try this:
To check if FOO
comes from Azure, check for the presence of an environment variable named APPSETTING_FOO
.
Upvotes: 2