Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 45 additions & 7 deletions aspnetcore/blazor/globalization-localization.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,17 @@ Add the following line to the `Program` file where services are registered:
builder.Services.AddLocalization();
```

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:
:::moniker range=">= aspnetcore-8.0"

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:

:::moniker-end

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

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:

:::moniker-end

```csharp
app.UseRequestLocalization(new RequestLocalizationOptions()
Expand Down Expand Up @@ -371,7 +381,21 @@ In the `Program` file:
builder.Services.AddLocalization();
```

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:
:::moniker-end

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

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:

:::moniker-end

:::moniker range=">= aspnetcore-6.0 < aspnetcore-8.0"

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:

:::moniker-end

:::moniker range=">= aspnetcore-6.0"

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

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

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

:::moniker-end

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

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

:::moniker-end

Expand Down Expand Up @@ -1125,7 +1149,7 @@ builder.Services.AddLocalization();

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

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

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

Immediately after Routing Middleware is added to the processing pipeline:
:::moniker-end

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

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>:

:::moniker-end

:::moniker range=">= aspnetcore-6.0 < aspnetcore-8.0"

Immediately after Routing Middleware (<xref:Microsoft.AspNetCore.Builder.EndpointRoutingApplicationBuilderExtensions.UseRouting%2A>) is added to the processing pipeline:

:::moniker-end

:::moniker range=">= aspnetcore-6.0"

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

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

```csharp
var supportedCultures = new[] { "en-US", "es-CR" };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,6 @@ In the following `GenericsExample` component:

```razor
@page "/generics-example"
@using System.Runtime.InteropServices
@implements IDisposable
@inject IJSRuntime JS

Expand All @@ -813,8 +812,7 @@ In the following `GenericsExample` component:

public async Task InvokeInterop()
{
var syncInterop =
RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER"));
var syncInterop = OperatingSystem.IsBrowser();

await JS.InvokeVoidAsync(
"invokeMethodsAsync", syncInterop, objRef1, objRef2);
Expand All @@ -834,7 +832,6 @@ In the following `GenericsExample` component:

```razor
@page "/generics-example"
@using System.Runtime.InteropServices
@implements IDisposable
@inject IJSRuntime JS

Expand All @@ -861,8 +858,7 @@ In the following `GenericsExample` component:

public async Task InvokeInterop()
{
var syncInterop =
RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER"));
var syncInterop = OperatingSystem.IsBrowser();

await JS.InvokeVoidAsync(
"invokeMethodsAsync", syncInterop, objRef1, objRef2);
Expand Down
6 changes: 4 additions & 2 deletions aspnetcore/security/enforcing-ssl.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Learn how to require HTTPS/TLS in an ASP.NET Core web app.
ms.author: tdykstra
monikerRange: '>= aspnetcore-3.0'
ms.custom: mvc, linux-related-content
ms.date: 09/06/2024
ms.date: 10/14/2024
uid: security/enforcing-ssl
---
# Enforce HTTPS in ASP.NET Core
Expand Down Expand Up @@ -470,4 +470,6 @@ In some cases, group policy may prevent self-signed certificates from being trus

:::moniker-end

[!INCLUDE[](~//security/enforcing-ssl/includes/enforcing-ssl6-8.md)]
[!INCLUDE[](~//security/enforcing-ssl/includes/enforcing-ssl6.md)]
[!INCLUDE[](~//security/enforcing-ssl/includes/enforcing-ssl7.md)]
[!INCLUDE[](~//security/enforcing-ssl/includes/enforcing-ssl8.md)]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:::moniker range=">= aspnetcore-6.0 <=aspnetcore-8.0"
:::moniker range="=aspnetcore-6.0"

> [!NOTE]
> 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).
Expand Down Expand Up @@ -263,6 +263,7 @@ See [this GitHub issue](https://github.com/dotnet/AspNetCore.Docs/issues/6199).

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.

<!-- Uncomment when linus-dev-certs supports .NET 6.0>
### Trust HTTPS certificate on Linux with linux-dev-certs

[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.
Expand All @@ -275,6 +276,7 @@ dotnet linux-dev-certs install
```

For more information or to report issues, see the [linux-dev-certs GitHub repository](https://github.com/tmds/linux-dev-certs).
-->

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

Expand Down
Loading
Loading