Skip to content

Commit e085f14

Browse files
committed
Apply changes from review
1 parent 12a651a commit e085f14

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

articles/azure-app-configuration/quickstart-aspnet-core-app.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Use the [.NET command-line interface (CLI)](/dotnet/core/tools) to create a new
4242
Run the following command to create an ASP.NET Core web app in a new *TestAppConfig* folder:
4343

4444
```dotnetcli
45-
dotnet new webapp --output TestAppConfig --framework net6.0
45+
dotnet new webapp --output TestAppConfig
4646
```
4747

4848
## Connect to the App Configuration store
@@ -74,7 +74,7 @@ Connect to your App Configuration store using Microsoft Entra ID (recommended),
7474
7575
### [Microsoft Entra ID (recommended)](#tab/entra-id)
7676
77-
The command uses [Secret Manager](/aspnet/core/security/app-secrets) to store a secret named `Endpoints:AppConfiguration`, which stores the endpoint for your App Configuration store. Replace the `<your-App-Configuration-endpoint>` placeholder with your App Configuration store's endpoint. You can find the endpoint in your App Configuration store's **Access settings** in the Azure portal.
77+
The command uses [Secret Manager](/aspnet/core/security/app-secrets) to store a secret named `Endpoints:AppConfiguration`, which stores the endpoint for your App Configuration store. Replace the `<your-App-Configuration-endpoint>` placeholder with your App Configuration store's endpoint. You can find the endpoint in your App Configuration store's **Overview** blade in the Azure portal.
7878
7979
```dotnetcli
8080
dotnet user-secrets init
@@ -122,21 +122,16 @@ Connect to your App Configuration store using Microsoft Entra ID (recommended),
122122
123123
```csharp
124124
var builder = new ConfigurationBuilder();
125-
builder.AddAzureAppConfiguration(options =>
125+
builder.Configuration.AddAzureAppConfiguration(options =>
126126
{
127-
string endpoint = Environment.GetEnvironmentVariable("Endpoint");
127+
string endpoint = builder.Configuration.Get("Endpoints:AppConfiguration");
128128
options.Connect(new Uri(endpoint), new DefaultAzureCredential());
129129
});
130130
131-
// Load configuration from Azure App Configuration
132-
builder.Configuration.AddAzureAppConfiguration(endpoint);
133-
134-
// The rest of existing code in program.cs
131+
// The rest of existing code in program.cs
135132
// ... ...
136133
```
137134
138-
This code connects to your App Configuration store using Microsoft Entra ID and load *all* key-values that have *no labels*. For more information on the App Configuration provider, see the [App Configuration provider API reference](/dotnet/api/Microsoft.Extensions.Configuration.AzureAppConfiguration).
139-
140135
### [Connection string](#tab/connection-string)
141136
142137
```csharp
@@ -152,7 +147,10 @@ Connect to your App Configuration store using Microsoft Entra ID (recommended),
152147
// ... ...
153148
```
154149
155-
This code connects to your App Configuration store using a connection string and loads *all* key-values that have *no labels*. For more information on the App Configuration provider, see the [App Configuration provider API reference](/dotnet/api/Microsoft.Extensions.Configuration.AzureAppConfiguration).
150+
---
151+
152+
This code loads *all* key-values that have *no label* from your App Configuration store. For more information on loading data from App Configuration, see the [App Configuration provider API reference](/dotnet/api/microsoft.extensions.configuration.azureappconfiguration.extensions).
153+
156154
157155
## Read from the App Configuration store
158156

0 commit comments

Comments
 (0)