Loading settings from User Secrets doesn't work
See original GitHub issueUser Secrets are supposed to be working but they don’t.
When trying to move settings from local.settings.json
to User Secrets, the following error is happening:
Azure Functions Core Tools
Core Tools Version: 3.0.3233 Commit hash: d1772f733802122a326fa696dd4c086292ec0171
Function Runtime Version: 3.0.15193.0
[2021-01-29T01:13:59.792Z] Found C:\github\djpool\mdc\Cloud\src\Endpoints\Integration\Integration.csproj. Using for user secrets file configuration.
Missing value for AzureWebJobsStorage in local.settings.json and User Secrets. This is required for all triggers other than httptrigger, kafkatrigger. You can run ‘func azure functionapp fetch-app-settings <functionAppName>’ or specify a connection string in local.settings.json or User Secrets.
Context: https://twitter.com/sfeldman/status/1354567460532285442
Issue Analytics
- State:
- Created 3 years ago
- Comments:27 (5 by maintainers)
Top Results From Across the Web
ASP.NET Core 2 web application isn't loading user secrets ...
So I moved my user secrets to environment variables (e.g. in my connection string example, adding a system environment variable ...
Read more >Using User Secrets Configuration In .NET - NET Core Tutorials
Right click your entry project and select “Manage User Secrets”. Visual Studio will then work out the rest, installing any packages you require...
Read more >Safe storage of app secrets in development in ASP.NET Core
In Visual Studio, right-click the project in Solution Explorer, and select Manage User Secrets from the context menu. This gesture adds a ...
Read more >ASP.NET Core (not that secret) User Secrets Explained
CreateDefaultBuilder method, ASP.NET Core automatically picks up your configuration from the secrets. json file.
Read more >Visual Studio - User Secrets
Provides a developer's overview on how to get started with using Visual Studio's User Secrets.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just to also iterate, kind of what’s already been said… the problem is also present running isolated processes in .NET 6
Having
MySpecialAppSettingConnectionString
set correctly in local.settings.json will work just fine.But it will not get picked up correctly from user secrets.
Not sure if that helps anyone, but I to get a message saying
Using for user secrets file configuration.
.<UserSecretsId>898cd92a-e4a0-46ff-9296-2fef4b6b9a14</UserSecretsId>
dotnet user-secrets list
gives:And app fails because none of those values are there.
I’ve modified
startup.cs
and solved the issue by adding:but I was expecting default builder to do it…