Skip to content

Commit 3880783

Browse files
Merge pull request #33839 from dotnet/main
Merge to Live
2 parents 6a41629 + bcd1cf3 commit 3880783

File tree

7 files changed

+1402
-17
lines changed

7 files changed

+1402
-17
lines changed

aspnetcore/blazor/globalization-localization.md

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,17 @@ Add the following line to the `Program` file where services are registered:
254254
builder.Services.AddLocalization();
255255
```
256256

257-
In ***server-side development***, you can specify the app's supported cultures immediately after Routing Middleware is added to the processing pipeline. The following example configures supported cultures for United States English and Costa Rican Spanish:
257+
:::moniker range=">= aspnetcore-8.0"
258+
259+
In ***server-side development***, specify the app's supported cultures before any middleware that might check the request culture. Generally, place Request Localization Middleware immediately before calling <xref:Microsoft.AspNetCore.Builder.RazorComponentsEndpointRouteBuilderExtensions.MapRazorComponents%2A>. The following example configures supported cultures for United States English and Costa Rican Spanish:
260+
261+
:::moniker-end
262+
263+
:::moniker range="< aspnetcore-8.0"
264+
265+
In ***server-side development***, specify the app's supported cultures immediately after Routing Middleware (<xref:Microsoft.AspNetCore.Builder.EndpointRoutingApplicationBuilderExtensions.UseRouting%2A>) is added to the processing pipeline. The following example configures supported cultures for United States English and Costa Rican Spanish:
266+
267+
:::moniker-end
258268

259269
```csharp
260270
app.UseRequestLocalization(new RequestLocalizationOptions()
@@ -371,7 +381,21 @@ In the `Program` file:
371381
builder.Services.AddLocalization();
372382
```
373383

374-
Specify the static culture in the `Program` file immediately after Routing Middleware is added to the processing pipeline. The following example configures United States English:
384+
:::moniker-end
385+
386+
:::moniker range=">= aspnetcore-8.0"
387+
388+
Specify the static culture in the `Program` file before any middleware that might check the request culture. Generally, place Request Localization Middleware immediately before <xref:Microsoft.AspNetCore.Builder.RazorComponentsEndpointRouteBuilderExtensions.MapRazorComponents%2A>. The following example configures United States English:
389+
390+
:::moniker-end
391+
392+
:::moniker range=">= aspnetcore-6.0 < aspnetcore-8.0"
393+
394+
Specify the static culture in the `Program` file immediately after Routing Middleware (<xref:Microsoft.AspNetCore.Builder.EndpointRoutingApplicationBuilderExtensions.UseRouting%2A>) is added to the processing pipeline. The following example configures United States English:
395+
396+
:::moniker-end
397+
398+
:::moniker range=">= aspnetcore-6.0"
375399

376400
```csharp
377401
app.UseRequestLocalization("en-US");
@@ -638,13 +662,13 @@ Set the app's default and supported cultures with <xref:Microsoft.AspNetCore.Bui
638662

639663
:::moniker range=">= aspnetcore-8.0"
640664

641-
Before the call to `app.MapRazorComponents` in the request processing pipeline, place the following code:
665+
Before the call to <xref:Microsoft.AspNetCore.Builder.RazorComponentsEndpointRouteBuilderExtensions.MapRazorComponents%2A> in the request processing pipeline, place the following code:
642666

643667
:::moniker-end
644668

645669
:::moniker range="< aspnetcore-8.0"
646670

647-
After the call to `app.UseRouting` in the request processing pipeline, place the following code:
671+
After Routing Middleware (<xref:Microsoft.AspNetCore.Builder.EndpointRoutingApplicationBuilderExtensions.UseRouting%2A>) is added to the request processing pipeline, place the following code:
648672

649673
:::moniker-end
650674

@@ -1125,7 +1149,7 @@ builder.Services.AddLocalization();
11251149

11261150
Set the app's default and supported cultures with <xref:Microsoft.AspNetCore.Builder.RequestLocalizationOptions>.
11271151

1128-
Before the call to `app.MapRazorComponents` in the request processing pipeline, place the following code:
1152+
Before the call to <xref:Microsoft.AspNetCore.Builder.RazorComponentsEndpointRouteBuilderExtensions.MapRazorComponents%2A> in the request processing pipeline, place the following code:
11291153

11301154
```csharp
11311155
var supportedCultures = new[] { "en-US", "es-CR" };
@@ -1366,7 +1390,21 @@ If the app doesn't already support dynamic culture selection:
13661390
builder.Services.AddLocalization();
13671391
```
13681392

1369-
Immediately after Routing Middleware is added to the processing pipeline:
1393+
:::moniker-end
1394+
1395+
:::moniker range=">= aspnetcore-8.0"
1396+
1397+
Place Request Localization Middleware before any middleware that might check the request culture. Generally, place the middleware immediately before calling <xref:Microsoft.AspNetCore.Builder.RazorComponentsEndpointRouteBuilderExtensions.MapRazorComponents%2A>:
1398+
1399+
:::moniker-end
1400+
1401+
:::moniker range=">= aspnetcore-6.0 < aspnetcore-8.0"
1402+
1403+
Immediately after Routing Middleware (<xref:Microsoft.AspNetCore.Builder.EndpointRoutingApplicationBuilderExtensions.UseRouting%2A>) is added to the processing pipeline:
1404+
1405+
:::moniker-end
1406+
1407+
:::moniker range=">= aspnetcore-6.0"
13701408

13711409
```csharp
13721410
var supportedCultures = new[] { "en-US", "es-CR" };
@@ -1393,7 +1431,7 @@ In `Startup.ConfigureServices` (`Startup.cs`):
13931431
services.AddLocalization();
13941432
```
13951433

1396-
In `Startup.Configure` immediately after Routing Middleware is added to the processing pipeline:
1434+
In `Startup.Configure` immediately after Routing Middleware (<xref:Microsoft.AspNetCore.Builder.EndpointRoutingApplicationBuilderExtensions.UseRouting%2A>) is added to the processing pipeline:
13971435

13981436
```csharp
13991437
var supportedCultures = new[] { "en-US", "es-CR" };

aspnetcore/blazor/javascript-interoperability/call-dotnet-from-javascript.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,6 @@ In the following `GenericsExample` component:
786786

787787
```razor
788788
@page "/generics-example"
789-
@using System.Runtime.InteropServices
790789
@implements IDisposable
791790
@inject IJSRuntime JS
792791
@@ -813,8 +812,7 @@ In the following `GenericsExample` component:
813812
814813
public async Task InvokeInterop()
815814
{
816-
var syncInterop =
817-
RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER"));
815+
var syncInterop = OperatingSystem.IsBrowser();
818816
819817
await JS.InvokeVoidAsync(
820818
"invokeMethodsAsync", syncInterop, objRef1, objRef2);
@@ -834,7 +832,6 @@ In the following `GenericsExample` component:
834832

835833
```razor
836834
@page "/generics-example"
837-
@using System.Runtime.InteropServices
838835
@implements IDisposable
839836
@inject IJSRuntime JS
840837
@@ -861,8 +858,7 @@ In the following `GenericsExample` component:
861858
862859
public async Task InvokeInterop()
863860
{
864-
var syncInterop =
865-
RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER"));
861+
var syncInterop = OperatingSystem.IsBrowser();
866862
867863
await JS.InvokeVoidAsync(
868864
"invokeMethodsAsync", syncInterop, objRef1, objRef2);

aspnetcore/security/enforcing-ssl.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to require HTTPS/TLS in an ASP.NET Core web app.
55
ms.author: tdykstra
66
monikerRange: '>= aspnetcore-3.0'
77
ms.custom: mvc, linux-related-content
8-
ms.date: 09/06/2024
8+
ms.date: 10/14/2024
99
uid: security/enforcing-ssl
1010
---
1111
# Enforce HTTPS in ASP.NET Core
@@ -470,4 +470,6 @@ In some cases, group policy may prevent self-signed certificates from being trus
470470

471471
:::moniker-end
472472

473-
[!INCLUDE[](~//security/enforcing-ssl/includes/enforcing-ssl6-8.md)]
473+
[!INCLUDE[](~//security/enforcing-ssl/includes/enforcing-ssl6.md)]
474+
[!INCLUDE[](~//security/enforcing-ssl/includes/enforcing-ssl7.md)]
475+
[!INCLUDE[](~//security/enforcing-ssl/includes/enforcing-ssl8.md)]

aspnetcore/security/enforcing-ssl/includes/enforcing-ssl6-8.md renamed to aspnetcore/security/enforcing-ssl/includes/enforcing-ssl6.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
:::moniker range=">= aspnetcore-6.0 <=aspnetcore-8.0"
1+
:::moniker range="=aspnetcore-6.0"
22

33
> [!NOTE]
44
> If you're using .NET 9 SDK or later, see the updated Linux procedures in the [.NET 9 version of this article](?view=aspnetcore-9.0&preserve-view=true).
@@ -263,6 +263,7 @@ See [this GitHub issue](https://github.com/dotnet/AspNetCore.Docs/issues/6199).
263263

264264
Establishing trust is distribution and browser specific. The following sections provide instructions for some popular distributions and the Chromium browsers (Edge and Chrome) and for Firefox.
265265

266+
<!-- Uncomment when linus-dev-certs supports .NET 6.0>
266267
### Trust HTTPS certificate on Linux with linux-dev-certs
267268
268269
[linux-dev-certs](https://github.com/tmds/linux-dev-certs) is an open-source, community-supported, .NET global tool that provides a convenient way to create and trust a developer certificate on Linux. The tool is not maintained or supported by Microsoft.
@@ -275,6 +276,7 @@ dotnet linux-dev-certs install
275276
```
276277
277278
For more information or to report issues, see the [linux-dev-certs GitHub repository](https://github.com/tmds/linux-dev-certs).
279+
-->
278280

279281
### Ubuntu trust the certificate for service-to-service communication
280282

0 commit comments

Comments
 (0)