Skip to content

Commit 86126ac

Browse files
Merge pull request #302321 from MicrosoftDocs/main
Merged by Learn.Build PR Management system
2 parents f9d69b8 + 3b5b058 commit 86126ac

File tree

44 files changed

+667
-289
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+667
-289
lines changed

articles/active-directory-b2c/best-practices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Manage your Azure AD B2C environment.
8484
| Use the Microsoft Graph API to automate the management of your B2C tenants | Microsoft Graph APIs:<br/>Manage [Identity Experience Framework](/graph/api/resources/trustframeworkpolicy?preserve-view=true&view=graph-rest-beta) (custom policies)<br/>[Keys](/graph/api/resources/trustframeworkkeyset?preserve-view=true&view=graph-rest-beta)<br/>[User Flows](/graph/api/resources/identityuserflow?preserve-view=true&view=graph-rest-beta) |
8585
| Integrate with Azure DevOps | A [CI/CD pipeline](deploy-custom-policies-devops.md) makes moving code between different environments easy and ensures production readiness always. |
8686
| Deploy custom policy | Azure AD B2C relies on caching to deliver performance to your end users. When you deploy a custom policy using whatever method, expect a delay of up to **30 minutes** for your users to see the changes. As a result of this behavior, consider the following practices when you deploy your custom policies: <br> - If you're deploying to a development environment, set the `DeploymentMode` attribute in your custom policy file's `<TrustFrameworkPolicy>` element to `Production`. <br> - Deploy your updated policy files to a production environment when traffic in your app is low. <br> - When you deploy to a production environment to update existing policy files, upload the updated files with new names, which act as new versions of the policies. Then, update your app references to the new names/versions. You can remove the old policy files afterward or keep them as your last known good configuration for easy rollback.<br> - If you need to deploy to a production environment to update existing policy files without versioning, make the new policy backward compatible with the old policy by following some simple rules. If you need to change a technical profile, claim, or [SubJourney](subjourneys.md), create a new version of it, publish the policy, and wait for 30 minutes for Azure AD B2C caches to pick up the new version. Then, in a subsequent update, make changes to use the new version and perform another policy update. Wait for another 30 minutes, then you can delete the old version of the elements if needed. Ensure all of your business logic is inside SubJourneys.<br> - You can set the `DeploymentMode` to `Development` in a production environment to bypass the caching behavior. However, we don't recommend this practice. If you [Collect Azure AD B2C logs with Application Insights](troubleshoot-with-application-insights.md), all claims sent to and from identity providers are collected, which is a security and performance risk. |
87-
| Deploy app registration updates | When you modify your application registration in your Azure AD B2C tenant, such as updating the application's redirect URI, expect a delay of up to **2 hours (3600s)** for the changes to take effect in the production environment. We recommend that you modify your application registration in your production environment when traffic in your app is low.|
87+
| Deploy app registration updates | When you modify your application registration in your Azure AD B2C tenant, such as updating the application's redirect URI, expect a delay of up to **2 hours (7200s)** for the changes to take effect in the production environment. We recommend that you modify your application registration in your production environment when traffic in your app is low.|
8888
| Integrate with Azure Monitor | [Audit log events](view-audit-logs.md) are only retained for seven days. [Integrate with Azure Monitor](azure-monitor.md) to retain the logs for long-term use, or integrate with third-party security information and event management (SIEM) tools to gain insights into your environment. |
8989
| Setup active alerting and monitoring | [Track user behavior](./analytics-with-application-insights.md) in Azure AD B2C using Application Insights. |
9090

articles/app-service/configure-language-dotnet-framework.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,20 @@ description: Learn how to configure an ASP.NET app in Azure App Service. This ar
55
ms.devlang: csharp
66
ms.custom: devx-track-csharp, devx-track-azurecli, devx-track-dotnet
77
ms.topic: article
8-
ms.date: 06/02/2020
8+
ms.date: 07/07/2025
99
author: cephalin
1010
ms.author: cephalin
11+
#customer intent: As an ASP.NET developer, I want to configure an ASP.NET app using Azure App Service to take advantage the Azure features.
1112
---
1213

1314
# Configure an ASP.NET app for Azure App Service
1415

1516
> [!NOTE]
1617
> For ASP.NET Core, see [Configure an ASP.NET Core app for Azure App Service](configure-language-dotnetcore.md). If your ASP.NET app runs in a custom Windows or Linux container, see [Configure a custom container for Azure App Service](configure-custom-container.md).
1718
18-
ASP.NET apps must be deployed to Azure App Service as compiled binaries. The Visual Studio publishing tool builds the solution and then deploys the compiled binaries directly, whereas the App Service deployment engine deploys the code repository first and then compiles the binaries.
19+
ASP.NET apps must be deployed to Azure App Service as compiled binaries. The Visual Studio publishing tool builds the solution and then deploys the compiled binaries directly. The App Service deployment engine deploys the code repository first and then compiles the binaries.
1920

20-
This guide provides key concepts and instructions for ASP.NET developers. If you've never used Azure App Service, follow the [ASP.NET quickstart](./quickstart-dotnetcore.md?tabs=netframework48) and [ASP.NET with SQL Database tutorial](app-service-web-tutorial-dotnet-sqldatabase.md) first.
21+
This guide provides key concepts and instructions for ASP.NET developers. If this article is your first experience with Azure App Service, follow [Deploy an ASP.NET web app](./quickstart-dotnetcore.md?tabs=netframework48) and [Deploy an ASP.NET app with Azure SQL database to Azure](app-service-web-tutorial-dotnet-sqldatabase.md) first.
2122

2223
## Show supported .NET Framework runtime versions
2324

@@ -29,7 +30,7 @@ For CLR 4 runtime versions (.NET Framework 4 and above):
2930
ls "D:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework"
3031
```
3132

32-
Latest .NET Framework version may not be immediately available.
33+
Latest .NET Framework version might not be immediately available.
3334

3435
For CLR 2 runtime versions (.NET Framework 3.5 and below):
3536

@@ -73,31 +74,31 @@ ConfigurationManager.ConnectionStrings["MyConnection"];
7374
}
7475
```
7576

76-
If you configure an app setting with the same name in App Service and in *web.config*, the App Service value takes precedence over the *web.config* value. The local *web.config* value lets you debug the app locally, but the App Service value lets your run the app in product with production settings. Connection strings work in the same way. This way, you can keep your application secrets outside of your code repository and access the appropriate values without changing your code.
77+
If you configure an app setting with the same name in App Service and in *web.config*, the App Service value takes precedence over the *web.config* value. The local *web.config* value lets you debug the app locally. The App Service value lets your run the app in product with production settings. Connection strings work in the same way. This way, you can keep your application secrets outside of your code repository and access the appropriate values without changing your code.
7778

7879
> [!NOTE]
7980
> Consider more secure connectivity options that don't require connection secrets at all. For more information, see [Secure connectivity to Azure services and databases from Azure App Service](tutorial-connect-overview.md).
8081
8182

8283
## Deploy multi-project solutions
8384

84-
When a Visual Studio solution includes multiple projects, the Visual Studio publish process already includes selecting the project to deploy. When you deploy to the App Service deployment engine, such as with Git, or with ZIP deploy [with build automation enabled](deploy-zip.md#enable-build-automation-for-zip-deploy), the App Service deployment engine picks the first Web Site or Web Application Project it finds as the App Service app. You can specify which project App Service should use by specifying the `PROJECT` app setting. For example, run the following in the [Cloud Shell](https://shell.azure.com):
85+
When a Visual Studio solution includes multiple projects, the Visual Studio publish process includes selecting the project to deploy. When you deploy to the App Service deployment engine, such as with Git, or with ZIP deploy [with build automation enabled](deploy-zip.md#enable-build-automation-for-zip-deploy), the App Service deployment engine picks the first Web Site or Web Application Project it finds as the App Service app. You can specify which project App Service should use by specifying the `PROJECT` app setting. For example, run the following command in the [Cloud Shell](https://shell.azure.com):
8586

8687
```azurecli-interactive
8788
az webapp config appsettings set --resource-group <resource-group-name> --name <app-name> --settings PROJECT="<project-name>/<project-name>.csproj"
8889
```
8990

9091
## Get detailed exceptions page
9192

92-
When your ASP.NET app generates an exception in the Visual Studio debugger, the browser displays a detailed exception page, but in App Service that page is replaced by a generic error message. To display the detailed exception page in App Service, open the *Web.config* file and add the `<customErrors mode="Off"/>` element under the `<system.web>` element. For example:
93+
When your ASP.NET app generates an exception in the Visual Studio debugger, the browser displays a detailed exception page. A generic error message replaces that page in App Service. To display the detailed exception page in App Service, open the *web.config* file and add the `<customErrors mode="Off"/>` element under the `<system.web>` element. For example:
9394

9495
```xml
9596
<system.web>
9697
<customErrors mode="Off"/>
9798
</system.web>
9899
```
99100

100-
Redeploy your app with the updated *Web.config*. You should now see the same detailed exception page.
101+
Redeploy your app with the updated *web.config*. You should now see the same detailed exception page.
101102

102103
## Access diagnostic logs
103104

articles/app-service/configure-language-dotnetcore.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ description: Learn how to configure an ASP.NET Core app in native Windows instan
44
ms.devlang: csharp
55
ms.custom: devx-track-csharp, devx-track-azurecli, devx-track-dotnet, linux-related-content
66
ms.topic: how-to
7-
ms.date: 06/02/2020
7+
ms.date: 07/07/2025
88
zone_pivot_groups: app-service-platform-windows-linux
99
author: cephalin
1010
ms.author: cephalin
11+
#customer intent: As an app designer, I want to learn how to configure my ASP.NET Core app to use Azure App Service.
1112
---
1213

1314
# Configure an ASP.NET Core app for Azure App Service
@@ -17,7 +18,7 @@ ms.author: cephalin
1718
1819
ASP.NET Core apps must be deployed to Azure App Service as compiled binaries. The Visual Studio publishing tool builds the solution and then deploys the compiled binaries directly. The App Service deployment engine deploys the code repository first and then compiles the binaries.
1920

20-
This guide provides key concepts and instructions for ASP.NET Core developers. If this is your first time using Azure App Service, first follow the [ASP.NET Core quickstart](quickstart-dotnetcore.md) and [ASP.NET Core with SQL Database tutorial](tutorial-dotnetcore-sqldb-app.md).
21+
This guide provides key concepts and instructions for ASP.NET Core developers. If this article is your first time using Azure App Service, first follow [Deploy an ASP.NET web app](quickstart-dotnetcore.md) and [Deploy an ASP.NET Core and Azure SQL Database app to Azure App Service](tutorial-dotnetcore-sqldb-app.md).
2122

2223
::: zone pivot="platform-windows"
2324

@@ -55,7 +56,7 @@ az webapp list-runtimes --os linux | grep DOTNET
5556

5657
## Set .NET Core version
5758

58-
::: zone pivot="platform-windows"
59+
::: zone pivot="platform-windows"
5960

6061
Set the target framework in the project file for your ASP.NET Core project. For more information, see [Select the .NET Core version to use](/dotnet/core/versions/selection).
6162

@@ -128,7 +129,7 @@ namespace SomeNamespace
128129
}
129130
```
130131

131-
If you configure an app setting with the same name in App Service and in `appsettings.json`, for example, the App Service value takes precedence over the `appsettings.json` value. By using the local `appsettings.json` value, you can debug the app locally, but by using the App Service value, you can run the app in production with production settings. Connection strings work the same way. By using this method, you can keep your application secrets outside your code repository and access the appropriate values without changing your code.
132+
If you configure an app setting with the same name in App Service and in `appsettings.json`, the App Service value takes precedence over the `appsettings.json` value. By using the local `appsettings.json` value, you can debug the app locally. By using the App Service value, you can run the app in production with production settings. Connection strings work the same way. By using this method, you can keep your application secrets outside your code repository and access the appropriate values without changing your code.
132133

133134
> [!NOTE]
134135
> You can also consider more secure connectivity options that don't require connection secrets. For more information, see [Secure connectivity to Azure services and databases from Azure App Service](tutorial-connect-overview.md).
@@ -154,7 +155,7 @@ az webapp config appsettings set --name <app-name> --resource-group <resource-gr
154155

155156
## Deploy multi-project solutions
156157

157-
When a Visual Studio solution includes multiple projects, the Visual Studio publish process automatically selects the project to deploy. When you deploy to the App Service deployment engine, such as with Git, or with ZIP deploy [with build automation enabled](deploy-zip.md#enable-build-automation-for-zip-deploy), the App Service deployment engine picks the first website or web application project that it finds as the App Service app. You can specify which project App Service should use by specifying the `PROJECT` app setting. For example, run the following command in [Cloud Shell](https://shell.azure.com):
158+
When a Visual Studio solution includes multiple projects, the Visual Studio publish process selects the project to deploy. When you deploy to the App Service deployment engine, such as with Git, or with ZIP deploy [with build automation enabled](deploy-zip.md#enable-build-automation-for-zip-deploy), the App Service deployment engine picks the first website or web application project that it finds as the App Service app. You can specify which project App Service should use by specifying the `PROJECT` app setting. For example, run the following command in [Cloud Shell](https://shell.azure.com):
158159

159160
```azurecli-interactive
160161
az webapp config appsettings set --resource-group <resource-group-name> --name <app-name> --settings PROJECT="<project-name>/<project-name>.csproj"
@@ -177,23 +178,23 @@ public static IHostBuilder CreateHostBuilder(string[] args) =>
177178
});
178179
```
179180

180-
You can then configure and generate logs with the [standard .NET Core pattern](/aspnet/core/fundamentals/logging).
181+
You can then configure and generate logs with the standard .NET Core pattern. See [Logging in .NET Core and ASP.NET Core](/aspnet/core/fundamentals/logging).
181182

182183
[!INCLUDE [Access diagnostic logs](../../includes/app-service-web-logs-access-no-h.md)]
183184

184185
For more information on troubleshooting ASP.NET Core apps in App Service, see [Troubleshoot ASP.NET Core on Azure App Service and IIS](/aspnet/core/test/troubleshoot-azure-iis).
185186

186187
## Access a detailed exceptions page
187188

188-
When your ASP.NET Core app generates an exception in the Visual Studio debugger, the browser displays a detailed exception page, but in App Service that page is replaced by a generic "HTTP 500" or "An error occurred while processing your request." To display the detailed exception page in App Service, add the `ASPNETCORE_ENVIRONMENT` app setting to your app by running the following command in <a target="_blank" href="https://shell.azure.com" >Cloud Shell</a>.
189+
When your ASP.NET Core app generates an exception in the Visual Studio debugger, the browser displays a detailed exception page. In App Service, a generic "HTTP 500" or "An error occurred while processing your request" message replaces that page. To display the detailed exception page in App Service, add the `ASPNETCORE_ENVIRONMENT` app setting to your app by running the following command in <a target="_blank" href="https://shell.azure.com" >Cloud Shell</a>.
189190

190191
```azurecli-interactive
191192
az webapp config appsettings set --name <app-name> --resource-group <resource-group-name> --settings ASPNETCORE_ENVIRONMENT="Development"
192193
```
193194

194195
## Detect HTTPS session
195196

196-
In App Service, [TLS/SSL termination](https://wikipedia.org/wiki/TLS_termination_proxy) happens at the network load balancers, so all HTTPS requests reach your app as unencrypted HTTP requests. If your app logic needs to know if user requests are encrypted, configure the Forwarded Headers Middleware in `Startup.cs`:
197+
In App Service, [TLS termination](https://wikipedia.org/wiki/TLS_termination_proxy) happens at the network load balancers. All HTTPS requests reach your app as unencrypted HTTP requests. If your app logic needs to know if user requests are encrypted, configure the Forwarded Headers Middleware in `Startup.cs`:
197198

198199
- Configure the middleware with [`ForwardedHeadersOptions`](/dotnet/api/microsoft.aspnetcore.builder.forwardedheadersoptions) to forward the `X-Forwarded-For` and `X-Forwarded-Proto` headers in `Startup.ConfigureServices`.
199200
- Add private IP address ranges to the known networks, so that the middleware can trust the App Service load balancer.
@@ -245,12 +246,12 @@ To rewrite or redirect a URL, use the [URL-rewriting middleware in ASP.NET Core]
245246

246247
## Related content
247248

248-
* [Tutorial: ASP.NET Core app with SQL Database](tutorial-dotnetcore-sqldb-app.md)
249+
- [Tutorial: Deploy an ASP.NET Core and Azure SQL Database app](tutorial-dotnetcore-sqldb-app.md)
249250

250251
::: zone pivot="platform-linux"
251252

252-
* [App Service Linux FAQ](faq-app-service-linux.yml)
253+
- [Azure App Service on Linux FAQ](faq-app-service-linux.yml)
253254

254255
::: zone-end
255256

256-
* [Environment variables and app settings reference](reference-app-settings.md)
257+
- [Environment variables and app settings reference](reference-app-settings.md)

0 commit comments

Comments
 (0)