You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For ARM templates, modify the properties `clientCertEnabled`, `clientCertMode`, and `clientCertExclusionPaths`. A sample ARM template snippet is provided for you:
61
61
@@ -88,25 +88,25 @@ When you enable mutual auth for your application, all paths under the root of yo
88
88
89
89
1. From the left navigation of your app's management page, select **Configuration** > **General Settings**.
90
90
91
-
1. Next to **Certificate exclusion paths**, click the edit icon.
91
+
1. Next to **Certificate exclusion paths**, select the edit icon.
92
92
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**.
94
94
95
-
1.Click**Save** at the top of the page.
95
+
1.Select**Save** at the top of the page.
96
96
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.
98
98
99
99
![Certificate Exclusion Paths][exclusion-paths]
100
100
101
101
## Access client certificate
102
102
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.
104
104
105
105
For ASP.NET, the client certificate is available through the **HttpRequest.ClientCertificate** property.
106
106
107
107
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.
108
108
109
-
## ASP.NET 5+, ASP.NET Core 3.1 sample
109
+
## ASP.NET Core sample
110
110
111
111
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).
112
112
@@ -241,12 +241,12 @@ public class Startup
241
241
privateboolIsValidClientCertificate()
242
242
{
243
243
// 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.
245
245
// 2. The subject name of the certificate has the common name nildevecc
246
246
// 3. The issuer name of the certificate has the common name nildevecc and organization name Microsoft Corp
247
247
// 4. The thumbprint of the certificate is 30757A2E831977D8BD9C8496E4C99AB26CB9622B
248
248
//
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
250
250
// and it allows for self signed certificates
251
251
//
252
252
@@ -344,7 +344,7 @@ export class AuthorizationHandler {
344
344
345
345
## Java sample
346
346
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.
348
348
349
349
350
350
```java
@@ -384,16 +384,16 @@ public class ClientCertValidator {
384
384
385
385
/**
386
386
* 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.
Copy file name to clipboardExpand all lines: articles/app-service/configure-language-dotnetcore.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,10 +60,10 @@ Set the target framework in the project file for your ASP.NET Core project. For
60
60
61
61
::: zone pivot="platform-linux"
62
62
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:
64
64
65
65
```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"
67
67
```
68
68
69
69
::: zone-end
@@ -79,7 +79,7 @@ If you deploy your app using Git, or zip packages [with build automation enabled
79
79
1. Run `dotnet publish` to build a binary for production.
80
80
1. Run custom script if specified by `POST_BUILD_SCRIPT_PATH`.
81
81
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`.
83
83
84
84
The following example specifies the two variables to a series of commands, separated by commas.
85
85
@@ -176,7 +176,7 @@ For more information on troubleshooting ASP.NET Core apps in App Service, see [T
176
176
177
177
## Get detailed exceptions page
178
178
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 <atarget="_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 <atarget="_blank"href="https://shell.azure.com" >Cloud Shell</a>.
180
180
181
181
```azurecli-interactive
182
182
az webapp config appsettings set --name <app-name> --resource-group <resource-group-name> --settings ASPNETCORE_ENVIRONMENT="Development"
0 commit comments