dotnet-sdk/examples/AspNetCore/SecretStoreConfigurationPro...
Whit Waldo c0d70ff24d
Quality of Life Improvements (#1504)
* Removed unnecessary comment
* Update to use file-level namespaces
* Using target-typed new expression
* QoL improvements to code base - primary constructors on classes and records, use of collection initializers, target-typed new expressions, etc.
* Applied all manner of QoL improvements to Dapr.Client
* Fixed break in example caused by nullability annotation change
* Refactored where streaming subscription example is located in solution to align with packages
* Refactored actor example to modernize
* Modernized example

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
2025-04-01 15:24:27 -05:00
..
Properties SDK Docs (#572) 2021-02-16 22:15:33 -08:00
components SDK Docs (#572) 2021-02-16 22:15:33 -08:00
Program.cs Quality of Life Improvements (#1504) 2025-04-01 15:24:27 -05:00
README.md Additional commits to drop .NET 6 and 7 (#1486) 2025-03-17 02:49:49 -05:00
SecretStoreConfigurationProviderSample.csproj Drop .NET 6 and .NET 7 support (#1482) 2025-03-16 23:49:22 -05:00
Startup.cs Quality of Life Improvements (#1504) 2025-04-01 15:24:27 -05:00
secrets.json SDK Docs (#572) 2021-02-16 22:15:33 -08:00

README.md

Dapr secret store configuration provider in ASP.NET Core

Prerequisites

Overview

This document describes how to use the Dapr Secret Store Configuration Provider sample to load Secrets into ASP.NET Core Configuration.

To load secrets into configuration call the AddDaprSecretStore extension method with the name of the Secret Store and a list of secrets descriptors or related metadata.

Using the Dapr Secret Store Configuration Provider ASP.NET Core example

1. Use Dapr to run the application

Use Dapr to run the application:

dapr run --app-id SecretStoreConfigurationProviderSample --resources-path ./components/ -- dotnet run

2. Test the application

Run the following command in other terminal:

curl http://localhost:5000/secret

The response should read: "This the way"