From fffaf07db4183572b96514ecf141eef5a037dec6 Mon Sep 17 00:00:00 2001 From: Robert Haken Date: Thu, 27 Feb 2025 01:59:24 +0100 Subject: [PATCH 1/8] [Blazor] What (#34818) --- aspnetcore/release-notes/aspnetcore-10/includes/blazor.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aspnetcore/release-notes/aspnetcore-10/includes/blazor.md b/aspnetcore/release-notes/aspnetcore-10/includes/blazor.md index 973820914614..f200d91e3f40 100644 --- a/aspnetcore/release-notes/aspnetcore-10/includes/blazor.md +++ b/aspnetcore/release-notes/aspnetcore-10/includes/blazor.md @@ -1,15 +1,15 @@ ### QuickGrid `RowClass` parameter -Apply a stylesheet class to a row of the grid based on the row item using the new `RowClass` parameter. In the following example, the `ApplyRowStyle` method is called on each row to conditionally apply a stylesheet class based on the row item: +Apply a stylesheet class to a row of the grid based on the row item using the new `RowClass` parameter. In the following example, the `GetRowCssClass` method is called on each row to conditionally apply a stylesheet class based on the row item: ```razor - + ... @code { - private string ApplyRowStyle({TYPE} rowItem) => - rowItem.{PROPERTY} == {VALUE} ? "{CSS STYLE CLASS}" : null; + private string GetRowCssClass(MyGridItem item) => + item.IsArchived ? "row-archived" : null; } ``` From 6fbabbb25ad9725a51f8c432932748b36d0325ea Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Wed, 26 Feb 2025 20:06:40 -0500 Subject: [PATCH 2/8] Patch the QuickGrid row style example (#34819) --- aspnetcore/blazor/components/quickgrid.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aspnetcore/blazor/components/quickgrid.md b/aspnetcore/blazor/components/quickgrid.md index c9279079e4ce..18901b1f957e 100644 --- a/aspnetcore/blazor/components/quickgrid.md +++ b/aspnetcore/blazor/components/quickgrid.md @@ -202,18 +202,18 @@ Apply a stylesheet class to a row of the grid based on the row item using the `R In the following example: * A row item is represented by the `Person` [record](/dotnet/csharp/language-reference/builtin-types/record). The `Person` record includes a `FirstName` property. -* The `HighlightJulie` method applies the `highlight` class styles to any row where the person's first name is "`Julie`." +* The `GetRowCssClass` method applies the `highlight-row` class styles to any row where the person's first name is "`Julie`." ```razor - + ... @code { private record Person(int PersonId, string FirstName, string LastName); - private string HighlightJulie(Person person) => - person.FirstName == "Julie" ? "highlight" : null; + private string GetRowCssClass(Person person) => + person.FirstName == "Julie" ? "highlight-row" : null; } ``` From b8c88e1f69151c7615d40549129fc11421e03e2e Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Thu, 27 Feb 2025 08:17:32 -0500 Subject: [PATCH 3/8] Add context to introductory remarks (#34826) --- .../components/render-components-outside-of-aspnetcore.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/blazor/components/render-components-outside-of-aspnetcore.md b/aspnetcore/blazor/components/render-components-outside-of-aspnetcore.md index 1dabf04f60a4..b9021124b38f 100644 --- a/aspnetcore/blazor/components/render-components-outside-of-aspnetcore.md +++ b/aspnetcore/blazor/components/render-components-outside-of-aspnetcore.md @@ -12,7 +12,7 @@ uid: blazor/components/render-outside-of-aspnetcore [!INCLUDE[](~/includes/not-latest-version-without-not-supported-content.md)] -Razor components can be rendered outside of the context of an HTTP request. You can render Razor components as HTML directly to a string or stream independently of the ASP.NET Core hosting environment. This is convenient for scenarios where you want to generate HTML fragments, such as for generating email content, generating static site content, or for building a content templating engine. +[Razor components](xref:blazor/components/index), which are self-contained portions of user interface (UI) with processing logic used in [ASP.NET Core Blazor](xref:blazor/index), can be rendered outside of the context of an HTTP request. You can render Razor components as HTML directly to a string or stream independently of the ASP.NET Core hosting environment. This is convenient for scenarios where you want to generate HTML fragments, such as for generating email content, generating static site content, or for building a content templating engine. In the following example, a Razor component is rendered to an HTML string from a console app: From 541518648170883295165abed3840fe85f2ca517 Mon Sep 17 00:00:00 2001 From: Arnold Buining Date: Thu, 27 Feb 2025 15:37:41 +0100 Subject: [PATCH 4/8] Update mfa.md to fix broken reference (#34827) --- aspnetcore/security/authentication/mfa.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aspnetcore/security/authentication/mfa.md b/aspnetcore/security/authentication/mfa.md index e888ea877ae6..427e47332838 100644 --- a/aspnetcore/security/authentication/mfa.md +++ b/aspnetcore/security/authentication/mfa.md @@ -45,7 +45,9 @@ MFA using TOTP is supported by default when using ASP.NET Core Identity. This ap For implementation details, see [Enable QR Code generation for TOTP authenticator apps in ASP.NET Core](xref:security/authentication/identity-enable-qrcodes). -To disable support for MFA TOTP, configure authentication using instead of . `AddDefaultIdentity` calls internally, which registers multiple token providers including one for MFA TOTP. To register only specific token providers, call for each required provider. For more information about available token providers, see the [AddDefaultTokenProviders source on GitHub](https://github.com/dotnet/aspnetcore/blob/release/6.0/src/Identity/Core/src/IdentityBuilderExtensions.cs#L21-L32). +To disable support for MFA TOTP, configure authentication using instead of . `AddDefaultIdentity` calls internally, which registers multiple token providers including one for MFA TOTP. To register only specific token providers, call for each required provider. For more information on available token providers, see the [`AddDefaultTokenProviders` reference source (`dotnet/aspnetcore` GitHub repository)](https://github.com/dotnet/aspnetcore/blob/main/src/Identity/Core/src/IdentityBuilderExtensions.cs). + +[!INCLUDE[](~/includes/aspnetcore-repo-ref-source-links.md)] ### MFA passkeys/FIDO2 or passwordless From 6db268c03aae14da407c91864576d44e6689d1bd Mon Sep 17 00:00:00 2001 From: Georg Jung Date: Thu, 27 Feb 2025 17:42:11 +0100 Subject: [PATCH 5/8] Updates inside `OnInitializedAsync` not streamed for POSTs (#34828) --- aspnetcore/blazor/forms/index.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/aspnetcore/blazor/forms/index.md b/aspnetcore/blazor/forms/index.md index 0d4f6b112d27..4c02b7206f5e 100644 --- a/aspnetcore/blazor/forms/index.md +++ b/aspnetcore/blazor/forms/index.md @@ -78,7 +78,9 @@ In the preceding `StarshipPlainForm` component: Blazor enhances page navigation and form handling by intercepting the request in order to apply the response to the existing DOM, preserving as much of the rendered form as possible. The enhancement avoids the need to fully load the page and provides a much smoother user experience, similar to a single-page app (SPA), although the component is rendered on the server. For more information, see . -[Streaming rendering](xref:blazor/components/rendering#streaming-rendering) is supported for plain HTML forms. + + +[Streaming rendering](xref:blazor/components/rendering#streaming-rendering) is supported for plain HTML forms. Note that when `POST`ing a form, only DOM updates inside the form's handlers are streamed (for example, `@onsubmit`). Updates inside `OnInitializedAsync` are only streamed for `GET` requests. For more information, see [Allow streaming the loading phase of POST responses (`dotnet/aspnetcore` #50994)](https://github.com/dotnet/aspnetcore/issues/50994). [!INCLUDE[](~/includes/aspnetcore-repo-ref-source-links.md)] @@ -124,7 +126,9 @@ In the preceding `Starship1` component: Blazor enhances page navigation and form handling for components. For more information, see . -[Streaming rendering](xref:blazor/components/rendering#streaming-rendering) is supported for . + + +[Streaming rendering](xref:blazor/components/rendering#streaming-rendering) is supported for . Note that when `POST`ing a form, only DOM updates inside the form's handlers are streamed (for example, `OnValidSubmit`). Updates inside `OnInitializedAsync` are only streamed for `GET` requests. For more information, see [Allow streaming the loading phase of POST responses (`dotnet/aspnetcore` #50994)](https://github.com/dotnet/aspnetcore/issues/50994). [!INCLUDE[](~/includes/aspnetcore-repo-ref-source-links.md)] From 66cdbca8f3023719ee155e6877da8347544a57ca Mon Sep 17 00:00:00 2001 From: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com> Date: Thu, 27 Feb 2025 09:55:01 -1000 Subject: [PATCH 6/8] Update index.md Fixes #34823 --- aspnetcore/security/authentication/social/index.md | 1 - 1 file changed, 1 deletion(-) diff --git a/aspnetcore/security/authentication/social/index.md b/aspnetcore/security/authentication/social/index.md index ad6a98523c54..fbe7ce2245f2 100644 --- a/aspnetcore/security/authentication/social/index.md +++ b/aspnetcore/security/authentication/social/index.md @@ -48,7 +48,6 @@ Enabling users to sign in with their existing credentials: * The `dotnet new` command creates a new Razor Pages project in the *WebApp1* folder. * `-au Individual` creates the code for Individual authentication. * `-uld` uses LocalDB, a lightweight version of SQL Server Express for Windows. Omit `-uld` to use SQLite. - * The `code` command opens the *WebApp1* folder in a new instance of Visual Studio Code. --- From 1b2220d8207722f879619f158f87a49c12de9841 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Thu, 27 Feb 2025 15:20:03 -0500 Subject: [PATCH 7/8] Silencing JSON comment errors (#34825) --- aspnetcore/fundamentals/configuration/index.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/aspnetcore/fundamentals/configuration/index.md b/aspnetcore/fundamentals/configuration/index.md index 7427800d5427..62fe29e96066 100644 --- a/aspnetcore/fundamentals/configuration/index.md +++ b/aspnetcore/fundamentals/configuration/index.md @@ -138,6 +138,16 @@ Using the [default](#default) configuration, the `appsettings.json` and `appsett Comments in `appsettings.json` and `appsettings.{Environment}.json` files are supported using JavaScript or [C# style comments](/dotnet/csharp/language-reference/tokens/comments). +Some integrated development environments (IDE) display errors when editing a JSON file that contains comments. You can generally ignore comment errors and warnings, but you can also usually disable them with a setting in the IDE. In Visual Studio Code, for example, add the following to the `settings.json` file to disable the errors: + +```json +"files.associations": { + "appsettings*.json": "jsonc" +} +``` + +For other IDEs, check the tool's documentation and other product support channels to determine how to silence the errors. + ### Bind hierarchical configuration data using the options pattern From 0f30e6c1a8106add7954944699897ebb2b32af2b Mon Sep 17 00:00:00 2001 From: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com> Date: Thu, 27 Feb 2025 12:29:38 -1000 Subject: [PATCH 8/8] Clean up link errors (#34852) * Clean up link errors * Clean up link errors * Clean up link errors --- aspnetcore/security/cors/includes/cors56.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aspnetcore/security/cors/includes/cors56.md b/aspnetcore/security/cors/includes/cors56.md index 1fb87882aa34..bfc050df28e7 100644 --- a/aspnetcore/security/cors/includes/cors56.md +++ b/aspnetcore/security/cors/includes/cors56.md @@ -469,7 +469,7 @@ Sec-Fetch-Site: cross-site User-Agent: Mozilla/5.0 ... ``` -In `OPTIONS` requests, the server sets the **Response headers** `Access-Control-Allow-Origin: {allowed origin}` header in the response. For example, the deployed [sample](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/security/cors/3.1sample/Cors/WebAPI), [Delete [EnableCors]](https://cors1.azurewebsites.net/test?number=2) button `OPTIONS` request contains the following headers: +In `OPTIONS` requests, the server sets the **Response headers** `Access-Control-Allow-Origin: {allowed origin}` header in the response. For example, the deployed [sample](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/security/cors/3.1sample/Cors/WebAPI), Delete button `OPTIONS` request contains the following headers: **General headers** @@ -1081,7 +1081,7 @@ Sec-Fetch-Site: cross-site User-Agent: Mozilla/5.0 ... ``` -In `OPTIONS` requests, the server sets the **Response headers** `Access-Control-Allow-Origin: {allowed origin}` header in the response. For example, the deployed [sample](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/security/cors/3.1sample/Cors/WebAPI), [Delete [EnableCors]](https://cors1.azurewebsites.net/test?number=2) button `OPTIONS` request contains the following headers: +In `OPTIONS` requests, the server sets the **Response headers** `Access-Control-Allow-Origin: {allowed origin}` header in the response. For example, the deployed [sample](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/security/cors/3.1sample/Cors/WebAPI), Delete button `OPTIONS` request contains the following headers: **General headers**