Skip to content

Commit 207b0b0

Browse files
authored
Merge pull request #292153 from MicrosoftDocs/main
OOB Publish 12/18 - ASAP
2 parents f04d1e2 + b19bc05 commit 207b0b0

File tree

11 files changed

+801
-62
lines changed

11 files changed

+801
-62
lines changed

articles/azure-app-configuration/howto-targetingfilter-aspnet-core.md

Lines changed: 77 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ ms.devlang: csharp
77
author: zhiyuanliang-ms
88
ms.author: zhiyuanliang
99
ms.topic: how-to
10-
ms.date: 03/26/2024
10+
ms.date: 12/02/2024
1111
---
1212

1313
# Roll out features to targeted audiences in an ASP.NET Core application
1414

15-
In this guide, you'll use the targeting filter to roll out a feature to targeted audience for your ASP.NET Core application. For more information about the targeting filter, see [Roll out features to targeted audiences](./howto-targetingfilter.md).
15+
In this guide, you'll use the targeting filter to roll out a feature to targeted audiences for your ASP.NET Core application. For more information about the targeting filter, see [Roll out features to targeted audiences](./howto-targetingfilter.md).
1616

1717
## Prerequisites
1818

@@ -23,30 +23,92 @@ In this guide, you'll use the targeting filter to roll out a feature to targeted
2323

2424
## Create a web application with a feature flag
2525

26-
In this section, you will create a web application that allows users to sign in and use the *Beta* feature flag you created before.
26+
In this section, you create a web application that allows users to sign in and use the *Beta* feature flag you created before.
2727

2828
1. Create a web application that authenticates against a local database using the following command.
2929

3030
```dotnetcli
3131
dotnet new webapp --auth Individual -o TestFeatureFlags
3232
```
3333

34-
1. Add references to the following NuGet packages.
34+
1. Navigate to the newly created *TestFeatureFlags* directory and add references to the following NuGet packages.
35+
36+
### [Microsoft Entra ID (recommended)](#tab/entra-id)
37+
38+
```dotnetcli
39+
dotnet add package Microsoft.Azure.AppConfiguration.AspNetCore
40+
dotnet add package Microsoft.FeatureManagement.AspNetCore
41+
dotnet add package Azure.Identity
42+
```
43+
44+
### [Connection string](#tab/connection-string)
3545
3646
```dotnetcli
3747
dotnet add package Microsoft.Azure.AppConfiguration.AspNetCore
3848
dotnet add package Microsoft.FeatureManagement.AspNetCore
3949
```
50+
---
51+
52+
1. Create a user secret for the application by running the following commands.
53+
54+
### [Microsoft Entra ID (recommended)](#tab/entra-id)
55+
56+
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.
57+
58+
```dotnetcli
59+
dotnet user-secrets init
60+
dotnet user-secrets set Endpoints:AppConfiguration "<your-App-Configuration-endpoint>"
61+
```
4062
41-
1. Store the connection string for your App Configuration store.
63+
### [Connection string](#tab/connection-string)
64+
65+
The command uses [Secret Manager](/aspnet/core/security/app-secrets) to store a secret named `ConnectionStrings:AppConfiguration`, which stores the connection string for your App Configuration store. Replace the `<your-App-Configuration-connection-string>` placeholder with your App Configuration store's read-only connection string. You can find the connection string in your App Configuration store's **Access settings** in the Azure portal.
4266
4367
```dotnetcli
4468
dotnet user-secrets init
45-
dotnet user-secrets set ConnectionStrings:AppConfig "<your_connection_string>"
69+
dotnet user-secrets set ConnectionStrings:AppConfiguration "<your-App-Configuration-connection-string>"
4670
```
71+
---
4772
4873
1. Add Azure App Configuration and feature management to your application.
4974
75+
### [Microsoft Entra ID (recommended)](#tab/entra-id)
76+
77+
1. You use the `DefaultAzureCredential` to authenticate to your App Configuration store. Follow the [instructions](./concept-enable-rbac.md#authentication-with-token-credentials) to assign your credential the **App Configuration Data Reader** role. Be sure to allow sufficient time for the permission to propagate before running your application.
78+
79+
1. Update the *Program.cs* file with the following code.
80+
81+
``` C#
82+
// Existing code in Program.cs
83+
// ... ...
84+
85+
using Azure.Identity;
86+
87+
var builder = WebApplication.CreateBuilder(args);
88+
89+
// Retrieve the endpoint
90+
string endpoint = builder.Configuration.GetValue<string>("Endpoints:AppConfiguration")
91+
?? throw new InvalidOperationException("The setting `Endpoints:AppConfiguration` was not found.");
92+
93+
// Connect to Azure App Configuration and load all feature flags with no label
94+
builder.Configuration.AddAzureAppConfiguration(options =>
95+
{
96+
options.Connect(new Uri(endpoint), new DefaultAzureCredential())
97+
.UseFeatureFlags();
98+
});
99+
100+
// Add Azure App Configuration middleware to the container of services
101+
builder.Services.AddAzureAppConfiguration();
102+
103+
// Add feature management to the container of services
104+
builder.Services.AddFeatureManagement();
105+
106+
// The rest of existing code in Program.cs
107+
// ... ...
108+
```
109+
110+
### [Connection string](#tab/connection-string)
111+
50112
Update the *Program.cs* file with the following code.
51113
52114
``` C#
@@ -55,14 +117,15 @@ In this section, you will create a web application that allows users to sign in
55117
56118
var builder = WebApplication.CreateBuilder(args);
57119
58-
// Retrieve the App Config connection string
59-
string AppConfigConnectionString = builder.Configuration.GetConnectionString("AppConfig") ?? throw new InvalidOperationException("Connection string 'AppConfig' not found."); ;
120+
// Retrieve the connection string
121+
string connectionString = builder.Configuration.GetConnectionString("AppConfiguration")
122+
?? throw new InvalidOperationException("The connection string 'AppConfiguration' was not found.");
60123
61-
// Load feature flag configuration from Azure App Configuration
124+
// Connect to Azure App Configuration and load all feature flags with no label
62125
builder.Configuration.AddAzureAppConfiguration(options =>
63126
{
64-
options.Connect(AppConfigConnectionString);
65-
options.UseFeatureFlags();
127+
options.Connect(connectionString)
128+
.UseFeatureFlags();
66129
});
67130
68131
// Add Azure App Configuration middleware to the container of services
@@ -75,6 +138,8 @@ In this section, you will create a web application that allows users to sign in
75138
// ... ...
76139
```
77140
141+
---
142+
78143
1. Enable configuration and feature flag refresh from Azure App Configuration with the App Configuration middleware.
79144
80145
Update Program.cs withe the following code.
@@ -104,7 +169,7 @@ In this section, you will create a web application that allows users to sign in
104169
<h1>This is the beta website.</h1>
105170
```
106171
107-
1. Open *Beta.cshtml.cs*, and add `FeatureGate` attribute to the `BetaModel` class.
172+
1. Open *Beta.cshtml.cs*, and add the `FeatureGate` attribute to the `BetaModel` class.
108173
109174
``` C#
110175
using Microsoft.AspNetCore.Mvc.RazorPages;

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

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,6 @@ Connect to your App Configuration store using Microsoft Entra ID (recommended),
6464
```
6565
---
6666
67-
1. Run the following command to restore packages for your project:
68-
69-
```dotnetcli
70-
dotnet restore
71-
```
72-
7367
1. Create a user secret for the application by navigating into the *TestAppConfig* folder and running the following command.
7468
7569
### [Microsoft Entra ID (recommended)](#tab/entra-id)
@@ -83,11 +77,11 @@ Connect to your App Configuration store using Microsoft Entra ID (recommended),
8377
8478
### [Connection string](#tab/connection-string)
8579
86-
The command uses [Secret Manager](/aspnet/core/security/app-secrets) to store a secret named `ConnectionStrings:AppConfig`, which stores the connection string for your App Configuration store. Replace the `<your_connection_string>` placeholder with your App Configuration store's connection string. You can find the connection string in your App Configuration store's **Access settings** in the Azure portal.
80+
The command uses [Secret Manager](/aspnet/core/security/app-secrets) to store a secret named `ConnectionStrings:AppConfiguration`, which stores the connection string for your App Configuration store. Replace the `<your-App-Configuration-connection-string>` placeholder with your App Configuration store's read-only connection string. You can find the connection string in your App Configuration store's **Access settings** in the Azure portal.
8781
8882
```dotnetcli
8983
dotnet user-secrets init
90-
dotnet user-secrets set ConnectionStrings:AppConfig "<your_connection_string>"
84+
dotnet user-secrets set ConnectionStrings:AppConfiguration "<your-App-Configuration-connection-string>"
9185
```
9286
9387
> [!TIP]
@@ -124,15 +118,16 @@ Connect to your App Configuration store using Microsoft Entra ID (recommended),
124118
var builder = WebApplication.CreateBuilder(args);
125119
126120
// Retrieve the endpoint
127-
string endpoint = builder.Configuration.Get("Endpoints:AppConfiguration");
128-
121+
string endpoint = builder.Configuration.GetValue<string>("Endpoints:AppConfiguration")
122+
?? throw new InvalidOperationException("The setting `Endpoints:AppConfiguration` was not found.");
123+
129124
// Load configuration from Azure App Configuration
130125
builder.Configuration.AddAzureAppConfiguration(options =>
131126
{
132127
options.Connect(new Uri(endpoint), new DefaultAzureCredential());
133128
});
134129
135-
// The rest of existing code in program.cs
130+
// The rest of existing code in program.cs
136131
// ... ...
137132
```
138133
@@ -142,7 +137,8 @@ Connect to your App Configuration store using Microsoft Entra ID (recommended),
142137
var builder = WebApplication.CreateBuilder(args);
143138
144139
// Retrieve the connection string
145-
string connectionString = builder.Configuration.GetConnectionString("AppConfig");
140+
string connectionString = builder.Configuration.GetConnectionString("AppConfiguration")
141+
?? throw new InvalidOperationException("The connection string 'AppConfiguration' was not found.");
146142
147143
// Load configuration from Azure App Configuration
148144
builder.Configuration.AddAzureAppConfiguration(connectionString);

articles/azure-app-configuration/use-variant-feature-flags-aspnet-core.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
2-
title: 'Tutorial: Use variant feature flags from Azure App Configuration in an ASP.NET application'
2+
title: 'Tutorial: Use variant feature flags from Azure App Configuration in an ASP.NET Core application'
33
titleSuffix: Azure App configuration
4-
description: In this tutorial, you learn how to use variant feature flags in an ASP.NET application
4+
description: In this tutorial, you learn how to use variant feature flags in an ASP.NET Core application
55
#customerintent: As a user of Azure App Configuration, I want to learn how I can use variants and variant feature flags in my ASP.NET application.
66
author: rossgrambo
77
ms.author: rossgrambo
88
ms.service: azure-app-configuration
99
ms.devlang: csharp
1010
ms.topic: tutorial
11-
ms.date: 10/18/2024
11+
ms.date: 12/18/2024
1212
---
1313

14-
# Tutorial: Use variant feature flags from Azure App Configuration in an ASP.NET application
14+
# Tutorial: Use variant feature flags in an ASP.NET Core application
1515

1616
In this tutorial, you use a variant feature flag to manage experiences for different user segments in an example application, *Quote of the Day*. You utilize the variant feature flag created in [Use variant feature flags](./use-variant-feature-flags.md). Before proceeding, ensure you create the variant feature flag named *Greeting* in your App Configuration store.
1717

@@ -28,10 +28,11 @@ In this tutorial, you use a variant feature flag to manage experiences for diffe
2828
dotnet new razor --auth Individual -o QuoteOfTheDay
2929
```
3030
31-
1. Create a [user secret](/aspnet/core/security/app-secrets) for the application by navigating into the *QuoteOfTheDay* folder and run the following command. This secret holds the endpoint for your App Configuration.
31+
1. Navigate to the *QuoteOfTheDay* directory and create a [user secret](/aspnet/core/security/app-secrets) for the application by running the following commands. 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.
3232
3333
```dotnetcli
34-
dotnet user-secrets set Endpoints:AppConfiguration "<App Configuration Endpoint>"
34+
dotnet user-secrets init
35+
dotnet user-secrets set Endpoints:AppConfiguration "<your-App-Configuration-endpoint>"
3536
```
3637
3738
1. Add the latest versions of the required packages.
@@ -44,26 +45,31 @@ In this tutorial, you use a variant feature flag to manage experiences for diffe
4445
4546
## Connect to App Configuration for feature management
4647
47-
1. In *Program.cs*, add the following using statements.
48+
1. Open *Program.cs* and add the following using statements.
4849
4950
```csharp
5051
using Azure.Identity;
5152
using Microsoft.Extensions.Configuration.AzureAppConfiguration;
5253
using Microsoft.FeatureManagement;
5354
```
5455
55-
1. In *Program.cs*, under the line `var builder = WebApplication.CreateBuilder(args);`, add the App Configuration provider, which pulls down the configuration from Azure App Configuration when the application starts. By default, the `UseFeatureFlags` method pulls down all feature flags with no label.
56+
1. Add the following code to connect to your App Configuration store and call `UseFeatureFlags` to pull down all feature flags with no label.
5657
5758
You use the `DefaultAzureCredential` to authenticate to your App Configuration store. Follow the [instructions](./concept-enable-rbac.md#authentication-with-token-credentials) to assign your credential the **App Configuration Data Reader** role. Be sure to allow sufficient time for the permission to propagate before running your application.
5859
5960
```csharp
61+
var builder = WebApplication.CreateBuilder(args);
62+
63+
// Retrieve the endpoint
64+
string endpoint = builder.Configuration.GetValue<string>("Endpoints:AppConfiguration")
65+
?? throw new InvalidOperationException("The setting `Endpoints:AppConfiguration` was not found.");
66+
67+
// Load configuration and feature flags from Azure App Configuration
6068
builder.Configuration
6169
.AddAzureAppConfiguration(options =>
6270
{
63-
string endpoint = builder.Configuration.Get("Endpoints:AppConfiguration");
64-
options.Connect(new Uri(endpoint), new DefaultAzureCredential());
65-
66-
options.UseFeatureFlags();
71+
options.Connect(new Uri(endpoint), new DefaultAzureCredential())
72+
.UseFeatureFlags();
6773
});
6874
```
6975

articles/azure-cache-for-redis/cache-network-isolation.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,25 @@ Virtual Network (VNet) enables many Azure resources to securely communicate with
5252

5353
### Limitations of VNet injection
5454

55-
- Creating and maintaining virtual network configurations is error prone. Troubleshooting network configuration issues is challenging. Incorrect virtual network configurations can lead to various issues:
56-
- loss of metrics for your cache instances
57-
- unplanned loss of availability, which can cause data loss (loss of availability caused by customer network configuration might not be covered by SLA)
58-
- failure to replicate data, which can cause data loss
55+
- Creating and maintaining virtual network configurations are often error prone. Troubleshooting is challenging, too. Incorrect virtual network configurations can lead to issues:
56+
57+
- obstructed metrics transmission from your cache instances
58+
59+
- failure of replica node to replicate data from primary node
60+
61+
- potential data loss
62+
5963
- failure of management operations like scaling
64+
65+
- intermittent or complete SSL/TLS failures
66+
67+
- failure to apply updates, including important security and reliability improvements
68+
69+
- in the most severe scenarios, loss of availability
70+
6071
- When using a VNet injected cache, you must keep your VNet updated to allow access to cache dependencies, such as Certificate Revocation Lists, Public Key Infrastructure, Azure Key Vault, Azure Storage, Azure Monitor, and more.
61-
- VNet injected caches are only available for Premium-tier Azure Cache for Redis instances.
62-
- You can't inject an existing Azure Cache for Redis instance into a Virtual Network. You can only select this option when you create the cache.
72+
- VNet injected caches are only available for Premium-tier Azure Cache for Redis instances, not other tiers.
73+
- You can't inject an existing Azure Cache for Redis instance into a Virtual Network. You must select this option when you *create* the cache.
6374

6475
## Firewall rules
6576

articles/cdn/edgio-retirement-faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ New Azure CDN from Edgio profiles can't be created after December 13, 2025.
6060

6161
### Can I request an extension for the retirement/shutdown of the Azure CDN from Edgio service?
6262

63-
No, extensions aren't possible. Edgio confirmed that their platform will shut down by January 15, 2024.
63+
No, extensions aren't possible. Edgio confirmed that their platform will shut down by January 15, 2025.

0 commit comments

Comments
 (0)