❔ WebAPI .NET 7.0 - Encrypt connectionstring in appsettings.json
guys, I'm writing some WebAPI using .NET 7.0, and I'd like to secure the connectionstring with encryption, I found a guide that suggest to do it by using
C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe
is it a good way or is something old?
currently the connectionstring is placed into appsettings.json
(not into web.config
) and this is its content:
2 Replies
The correct way is to use
user-secrets
on development, and to use a keyvault or environment variables in production
You should not have connectionstrings checked into your source controlWas this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.