You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: blogs/series-5-devops-data/5.9-azure-key-vault-secrets.md
+66-1Lines changed: 66 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,8 @@ This article is part of the **AngularNetTutorial** series covering Angular 20, .
25
25
***`DefaultAzureCredential`** — how one credential works for both local development and Azure production with no code changes
26
26
***`AddAzureKeyVault()` in .NET** — how to wire Key Vault into `IConfiguration` so existing code requires zero changes
27
27
***`SecretClient`** — reading a specific secret directly in code when you need it on demand
28
-
***Local development** — using `dotnet user-secrets` locally, Key Vault in production
28
+
***Visual Studio Manage User Secrets** — the local development equivalent of Key Vault, stored in AppData and never committed to git
29
+
***Three secret sources, one IConfiguration key** — how user secrets, GitHub Secrets, and Key Vault work together across environments
29
30
30
31
---
31
32
@@ -343,6 +344,70 @@ public class MyService(SecretClient secretClient)
343
344
344
345
---
345
346
347
+
## 🖥️ Local Development: Visual Studio Manage User Secrets
348
+
349
+
During local development you don't need Key Vault — it requires Azure network access and adds friction for every team member. Visual Studio has a built-in equivalent called **Manage User Secrets** that stores secrets outside the project folder so they're never committed to git.
350
+
351
+
### How to Open It
352
+
353
+
Right-click the `TalentManagementAPI.WebApi` project in Solution Explorer → **Manage User Secrets**
The GUID is the `<UserSecretsId>` value already in `TalentManagementAPI.WebApi.csproj`. Each developer has their own copy — the file never appears in git.
**The application code never changes across environments.** `builder.Configuration["ConnectionStrings:DefaultConnection"]` works the same way whether the value came from `secrets.json`, an App Service setting, or a Key Vault reference.
408
+
409
+
---
410
+
346
411
## 🔄 When to Use Each Approach
347
412
348
413
**App Service Key Vault references** (`@Microsoft.KeyVault(...)` in settings):
0 commit comments