I am trying to retrieve a custom setting from local.settings.json file. Example I am trying to read tables list present in the below local.settings.json file
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"AzureWebJobsDashboard": "UseDevelopmentStorage=true",
"TableList": "TestTableName1,TestTableName2"
}
}
Using the following code am reading it
string tableslist = ConfigurationManager.AppSettings["TableList"];
and it works, but I've read in a few places that this works only when debugging locally, it might not work after it is deployed, in production environment. Could someone point me how to do this in the right way? Or the problem is only applicable to the connection string related settings?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…