Visual Studio debugging "Failed to decrypt settings. Encrypted settings only be edited through 'func settings add'".
- Dominant language
- PowerShell
- Stars
- 1.1k
- Forks
- 215
- Avg merge
- 4h 2m
- Merged PRs (30d)
- 1
Description
Create an Azure Functions 2.x C# app and associated function
Add local.settings.json, e.g.
```
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
"WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT": "1"
},
"AppSettings": {
"local.logging.path": "c:\\temp\\diagnostics\\",
},
"ConnectionStrings": {
"management.webhook": "http://localhost:35617",
"management.circuitbreaker.timespanSeconds": 60
}
}
```
Note that the connection string contains an unexpected value ("management.circuitbreaker.timespanSeconds")
Execute similar layout in WebJobs SDK = no issues
Execute layout in Azure Functions = fail on startup with "Failed to decrypt settings. Encrypted settings only be edited through 'func settings add'."
Error is incorrect and misleading; nothing to do with encryption (as local.settings.json has "IsEncrypted": false) but is in fact due to a failure to parse the "management.circuitbreaker.timespanSeconds": 60 value.
Expected that the error does not refer to encryption but instead refers to "cannot parse settings file" and preferably with the value that is causing the problem,
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.