Skip to content

Commit 2a3435d

Browse files
Merge pull request #279654 from cephalin/corerefresh2
Update to 8.0, add codespaces, AZD, and Copilot
2 parents c4891c6 + dd20c19 commit 2a3435d

27 files changed

+449
-113
lines changed

.openpublishing.publish.config.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -986,6 +986,12 @@
986986
"branch": "main",
987987
"branch_mapping": {}
988988
},
989+
{
990+
"path_to_root": "msdocs-app-service-sqldb-dotnetcore",
991+
"url": "https://github.com/Azure-Samples/msdocs-app-service-sqldb-dotnetcore",
992+
"branch": "main",
993+
"branch_mapping": {}
994+
},
989995
{
990996
"path_to_root": "azuresignalr-samples",
991997
"url": "https://github.com/aspnet/AzureSignalR-samples",

articles/app-service/app-service-web-configure-tls-mutual-auth.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ To set up your app to require client certificates:
2626

2727
1. From the left navigation of your app's management page, select **Configuration** > **General Settings**.
2828

29-
1. Set **Client certificate mode** to **Require**. Click **Save** at the top of the page.
29+
1. Set **Client certificate mode** to **Require**. Select **Save** at the top of the page.
3030

3131
### [Azure CLI](#tab/azurecli)
3232
To do the same with Azure CLI, run the following command in the [Cloud Shell](https://shell.azure.com):
@@ -55,7 +55,7 @@ resource appService 'Microsoft.Web/sites@2020-06-01' = {
5555
}
5656
```
5757

58-
### [ARM](#tab/arm)
58+
### [ARM template](#tab/arm)
5959

6060
For ARM templates, modify the properties `clientCertEnabled`, `clientCertMode`, and `clientCertExclusionPaths`. A sample ARM template snippet is provided for you:
6161

@@ -88,25 +88,25 @@ When you enable mutual auth for your application, all paths under the root of yo
8888

8989
1. From the left navigation of your app's management page, select **Configuration** > **General Settings**.
9090

91-
1. Next to **Certificate exclusion paths**, click the edit icon.
91+
1. Next to **Certificate exclusion paths**, select the edit icon.
9292

93-
1. Click **New path**, specify a path, or a list of paths separated by `,` or `;`, and click **OK**.
93+
1. Select **New path**, specify a path, or a list of paths separated by `,` or `;`, and select **OK**.
9494

95-
1. Click **Save** at the top of the page.
95+
1. Select **Save** at the top of the page.
9696

97-
In the following screenshot, any path for your app that starts with `/public` does not request a client certificate. Path matching is case-insensitive.
97+
In the following screenshot, any path for your app that starts with `/public` doesn't request a client certificate. Path matching is case-insensitive.
9898

9999
![Certificate Exclusion Paths][exclusion-paths]
100100

101101
## Access client certificate
102102

103-
In App Service, TLS termination of the request happens at the frontend load balancer. When forwarding the request to your app code with [client certificates enabled](#enable-client-certificates), App Service injects an `X-ARR-ClientCert` request header with the client certificate. App Service does not do anything with this client certificate other than forwarding it to your app. Your app code is responsible for validating the client certificate.
103+
In App Service, TLS termination of the request happens at the frontend load balancer. When App Service forwards the request to your app code with [client certificates enabled](#enable-client-certificates), it injects an `X-ARR-ClientCert` request header with the client certificate. App Service doesn't do anything with this client certificate other than forwarding it to your app. Your app code is responsible for validating the client certificate.
104104

105105
For ASP.NET, the client certificate is available through the **HttpRequest.ClientCertificate** property.
106106

107107
For other application stacks (Node.js, PHP, etc.), the client cert is available in your app through a base64 encoded value in the `X-ARR-ClientCert` request header.
108108

109-
## ASP.NET 5+, ASP.NET Core 3.1 sample
109+
## ASP.NET Core sample
110110

111111
For ASP.NET Core, middleware is provided to parse forwarded certificates. Separate middleware is provided to use the forwarded protocol headers. Both must be present for forwarded certificates to be accepted. You can place custom certificate validation logic in the [CertificateAuthentication options](/aspnet/core/security/authentication/certauth).
112112

@@ -241,12 +241,12 @@ public class Startup
241241
private bool IsValidClientCertificate()
242242
{
243243
// In this example we will only accept the certificate as a valid certificate if all the conditions below are met:
244-
// 1. The certificate is not expired and is active for the current time on server.
244+
// 1. The certificate isn't expired and is active for the current time on server.
245245
// 2. The subject name of the certificate has the common name nildevecc
246246
// 3. The issuer name of the certificate has the common name nildevecc and organization name Microsoft Corp
247247
// 4. The thumbprint of the certificate is 30757A2E831977D8BD9C8496E4C99AB26CB9622B
248248
//
249-
// This example does NOT test that this certificate is chained to a Trusted Root Authority (or revoked) on the server
249+
// This example doesn't test that this certificate is chained to a Trusted Root Authority (or revoked) on the server
250250
// and it allows for self signed certificates
251251
//
252252
@@ -344,7 +344,7 @@ export class AuthorizationHandler {
344344

345345
## Java sample
346346

347-
The following Java class encodes the certificate from `X-ARR-ClientCert` to an `X509Certificate` instance. `certificateIsValid()` validates that the certificate's thumbprint matches the one given in the constructor and that certificate has not expired.
347+
The following Java class encodes the certificate from `X-ARR-ClientCert` to an `X509Certificate` instance. `certificateIsValid()` validates that the certificate's thumbprint matches the one given in the constructor and that certificate hasn't expired.
348348

349349

350350
```java
@@ -384,16 +384,16 @@ public class ClientCertValidator {
384384

385385
/**
386386
* Check that the certificate's thumbprint matches the one given in the constructor, and that the
387-
* certificate has not expired.
388-
* @return True if the certificate's thumbprint matches and has not expired. False otherwise.
387+
* certificate hasn't expired.
388+
* @return True if the certificate's thumbprint matches and hasn't expired. False otherwise.
389389
*/
390390
public boolean certificateIsValid() throws NoSuchAlgorithmException, CertificateEncodingException {
391391
return certificateHasNotExpired() && thumbprintIsValid();
392392
}
393393

394394
/**
395395
* Check certificate's timestamp.
396-
* @return Returns true if the certificate has not expired. Returns false if it has expired.
396+
* @return Returns true if the certificate hasn't expired. Returns false if it has expired.
397397
*/
398398
private boolean certificateHasNotExpired() {
399399
Date currentTime = new java.util.Date();

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ Set the target framework in the project file for your ASP.NET Core project. For
6060

6161
::: zone pivot="platform-linux"
6262

63-
Run the following command in the [Cloud Shell](https://shell.azure.com) to set the .NET Core version to 3.1:
63+
Run the following command in the [Cloud Shell](https://shell.azure.com) to set the .NET Core version to 8.0:
6464

6565
```azurecli-interactive
66-
az webapp config set --name <app-name> --resource-group <resource-group-name> --linux-fx-version "DOTNETCORE|3.1"
66+
az webapp config set --name <app-name> --resource-group <resource-group-name> --linux-fx-version "DOTNETCORE|8.0"
6767
```
6868

6969
::: zone-end
@@ -79,7 +79,7 @@ If you deploy your app using Git, or zip packages [with build automation enabled
7979
1. Run `dotnet publish` to build a binary for production.
8080
1. Run custom script if specified by `POST_BUILD_SCRIPT_PATH`.
8181

82-
`PRE_BUILD_COMMAND` and `POST_BUILD_COMMAND` are environment variables that are empty by default. To run pre-build commands, define `PRE_BUILD_COMMAND`. To run post-build commands, define `POST_BUILD_COMMAND`.
82+
`PRE_BUILD_COMMAND` and `POST_BUILD_COMMAND` are environment variables that are empty by default. To run prebuild commands, define `PRE_BUILD_COMMAND`. To run post-build commands, define `POST_BUILD_COMMAND`.
8383

8484
The following example specifies the two variables to a series of commands, separated by commas.
8585

@@ -176,7 +176,7 @@ For more information on troubleshooting ASP.NET Core apps in App Service, see [T
176176

177177
## Get detailed exceptions page
178178

179-
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** error or **An error occurred while processing your request.** message. To display the detailed exception page in App Service, Add the `ASPNETCORE_ENVIRONMENT` app setting to your app by running the following command in the <a target="_blank" href="https://shell.azure.com" >Cloud Shell</a>.
179+
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 the <a target="_blank" href="https://shell.azure.com" >Cloud Shell</a>.
180180

181181
```azurecli-interactive
182182
az webapp config appsettings set --name <app-name> --resource-group <resource-group-name> --settings ASPNETCORE_ENVIRONMENT="Development"
-17.8 KB
Loading
57.5 KB
Loading
11 KB
Loading
-50.2 KB
Loading
96.4 KB
Loading
12.7 KB
Loading
158 KB
Loading

0 commit comments

Comments
 (0)