Run the following command in your project directory: dotnet user-secrets init ``` Use code with caution. Copied to clipboard 2. Add Your Secrets
Adding them directly to the secrets.json file that opens after you select Manage User Secrets . Via .NET CLI: Use the set command to add individual keys: How to manage user secrets in ASP.NET Core
To use user secrets, you must first initialize your project. This adds a UserSecretsId to your .csproj file, which maps your project to a specific folder in your local user profile. Run the following command in your project directory:
Take advantage of user secrets management in ASP.NET Core to prevent the sharing of sensitive application data in your projects. . EP 36 : How to manage User Secrets in ASP.NET Core Web API How to manage user secrets in ASP.NET Core
Right-click the project in Solution Explorer and select Manage User Secrets .