How To Keep SECRET Strings REALLY SECRET in ASP.NET Core?

preview_player
Показать описание
#aspnetcore #dotnet

Join this channel to get source code access and other perks:

Content
1. Intro: 00:00
2. Asp.Net Core configuration: 00:52
4. Configuration in environment variables: 04:07
5. Configuration in CLI arguments: 05:11
6. Configuration order matters! 06:34
7. Connection string in appsettings? No, thanks! 08:54
8. User secrets to the rescue! 10:28
9. Deployment considerations: 13:17
Рекомендации по теме
Комментарии
Автор

Thank you Dan. On a side note. If you right mouse click on the project file, from the menu you can select "Manage User Secrets". Another way besides the command line. This is in VS 2022.

rd_Century
Автор

Thanks for providing exactly the knowledge I needed. I'm gonna combine this with Gitlab environment variables when deploying the application.

MarllonVilano
Автор

This is the information I need. Special thanks Dan. As always super clear explanation.

danielegiovanetti
Автор

Thanks for clear explanation and good examples!

xelaksal
Автор

Thank you for teaching me something new.

muradhossen
Автор

Like always very good content, Thanks.

MihaiMoisei
Автор

Very useful video, thanks 😉👍 .
I got error "Could not find the global property 'UserSecretsId' in MSBuild project ...",
but helped me call "dotnet user-secrets init" before calling " dotnet user-secrets set ...", then all was ok 🙂 .

zephycz
Автор

thanks for the video but i think there is a better way to encrypt/hide connection strings. Why use some other package like codewrinkles?

doogiehowser
Автор

wow good to know something new, So if the app in on prem and there's no CI/CD how do we switch between the user secrets based on environment ?

coding-gemini
Автор

Hi! Did you ever create a video that shows how to store keys in environment variables for production on an on-prem windows server? I know how to create the variables in Windows and deploy the app to IIS, but I would like to see a quick example in the .net core code of how to get it to reference those local environment variables. For instance, is there something we need to add to the program or something so that it knows to look in the local environmental variables? Thanks!

erinh
Автор

I got this problem when hitting the controller

The ConnectionString property has not been initialized."

booby
Автор

Normally one can use the AzureKeyVault to store the connection strings etc. when deploying your application. Is that correct?

riddickful
Автор

Environment variables and user secrets are not best practice for production. You should go for azure key vault.

dharwal