Skip to content

Content follow-up updates (8.0) #31622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 30, 2024
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
22 changes: 21 additions & 1 deletion aspnetcore/blazor/components/built-in-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,21 @@ The following built-in Razor components are provided by the Blazor framework:

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

<!-- UPDATE 8.0 Confirm/update list -->
<!-- Link for FormMappingValidator. Addition to docs tracked by
https://github.com/dotnet/AspNetCore.Docs/issues/31621

* [`FormMappingValidator`](xref:blazor/forms/validation#validation-summary-and-validation-message-components)
-->

* [`App`](xref:blazor/project-structure)
* [`AntiforgeryToken`](xref:blazor/forms/index#antiforgery-support)
* [`Authentication`](xref:blazor/security/webassembly/index#authentication-component)
* [`AuthorizeView`](xref:blazor/security/index#authorizeview-component)
* [`CascadingValue`](xref:blazor/components/cascading-values-and-parameters#cascadingvalue-component)
* [`DataAnnotationsValidator`](xref:blazor/forms/validation#data-annotations-validator-component-and-custom-validation)
* [`DynamicComponent`](xref:blazor/components/dynamiccomponent)
* [`Editor<T>`](xref:blazor/forms/binding#nest-and-bind-forms)
* [`EditForm`](xref:blazor/forms/binding#editformeditcontext-model)
* [`ErrorBoundary`](xref:blazor/fundamentals/handle-errors#error-boundaries)
* [`FocusOnNavigate`](xref:blazor/fundamentals/routing#focus-an-element-on-navigation)
* [`HeadContent`](xref:blazor/components/control-head-content)
Expand All @@ -47,6 +54,7 @@ The following built-in Razor components are provided by the Blazor framework:
* [`RouteView`](xref:blazor/fundamentals/routing#route-templates)
* [`SectionContent`](xref:blazor/components/sections)
* [`SectionOutlet`](xref:blazor/components/sections)
* [`ValidationSummary`](xref:blazor/forms/validation#validation-summary-and-validation-message-components)
* [`Virtualize`](xref:blazor/components/virtualization)

:::moniker-end
Expand All @@ -57,7 +65,9 @@ The following built-in Razor components are provided by the Blazor framework:
* [`Authentication`](xref:blazor/security/webassembly/index#authentication-component)
* [`AuthorizeView`](xref:blazor/security/index#authorizeview-component)
* [`CascadingValue`](xref:blazor/components/cascading-values-and-parameters#cascadingvalue-component)
* [`DataAnnotationsValidator`](xref:blazor/forms/validation#data-annotations-validator-component-and-custom-validation)
* [`DynamicComponent`](xref:blazor/components/dynamiccomponent)
* [`EditForm`](xref:blazor/forms/binding#editformeditcontext-model)
* [`ErrorBoundary`](xref:blazor/fundamentals/handle-errors#error-boundaries)
* [`FocusOnNavigate`](xref:blazor/fundamentals/routing#focus-an-element-on-navigation)
* [`HeadContent`](xref:blazor/components/control-head-content)
Expand All @@ -79,6 +89,7 @@ The following built-in Razor components are provided by the Blazor framework:
* [`QuickGrid`](xref:blazor/components/quickgrid)
* [`Router`](xref:blazor/fundamentals/routing#route-templates)
* [`RouteView`](xref:blazor/fundamentals/routing#route-templates)
* [`ValidationSummary`](xref:blazor/forms/validation#validation-summary-and-validation-message-components)
* [`Virtualize`](xref:blazor/components/virtualization)

:::moniker-end
Expand All @@ -89,7 +100,9 @@ The following built-in Razor components are provided by the Blazor framework:
* [`Authentication`](xref:blazor/security/webassembly/index#authentication-component)
* [`AuthorizeView`](xref:blazor/security/index#authorizeview-component)
* [`CascadingValue`](xref:blazor/components/cascading-values-and-parameters#cascadingvalue-component)
* [`DataAnnotationsValidator`](xref:blazor/forms/validation#data-annotations-validator-component-and-custom-validation)
* [`DynamicComponent`](xref:blazor/components/dynamiccomponent)
* [`EditForm`](xref:blazor/forms/binding#editformeditcontext-model)
* [`ErrorBoundary`](xref:blazor/fundamentals/handle-errors#error-boundaries)
* [`FocusOnNavigate`](xref:blazor/fundamentals/routing#focus-an-element-on-navigation)
* [`HeadContent`](xref:blazor/components/control-head-content)
Expand All @@ -110,6 +123,7 @@ The following built-in Razor components are provided by the Blazor framework:
* [`PageTitle`](xref:blazor/components/control-head-content)
* [`Router`](xref:blazor/fundamentals/routing#route-templates)
* [`RouteView`](xref:blazor/fundamentals/routing#route-templates)
* [`ValidationSummary`](xref:blazor/forms/validation#validation-summary-and-validation-message-components)
* [`Virtualize`](xref:blazor/components/virtualization)

:::moniker-end
Expand All @@ -120,6 +134,8 @@ The following built-in Razor components are provided by the Blazor framework:
* [`Authentication`](xref:blazor/security/webassembly/index#authentication-component)
* [`AuthorizeView`](xref:blazor/security/index#authorizeview-component)
* [`CascadingValue`](xref:blazor/components/cascading-values-and-parameters#cascadingvalue-component)
* [`DataAnnotationsValidator`](xref:blazor/forms/validation#data-annotations-validator-component-and-custom-validation)
* [`EditForm`](xref:blazor/forms/binding#editformeditcontext-model)
* [`InputCheckbox`](xref:blazor/forms/input-components)
* [`InputDate`](xref:blazor/forms/input-components)
* [`InputFile`](xref:blazor/file-uploads)
Expand All @@ -135,6 +151,7 @@ The following built-in Razor components are provided by the Blazor framework:
* [`NavMenu`](xref:blazor/fundamentals/routing#navlink-and-navmenu-components)
* [`Router`](xref:blazor/fundamentals/routing#route-templates)
* [`RouteView`](xref:blazor/fundamentals/routing#route-templates)
* [`ValidationSummary`](xref:blazor/forms/validation#validation-summary-and-validation-message-components)
* [`Virtualize`](xref:blazor/components/virtualization)

:::moniker-end
Expand All @@ -145,6 +162,8 @@ The following built-in Razor components are provided by the Blazor framework:
* [`Authentication`](xref:blazor/security/webassembly/index#authentication-component)
* [`AuthorizeView`](xref:blazor/security/index#authorizeview-component)
* [`CascadingValue`](xref:blazor/components/cascading-values-and-parameters#cascadingvalue-component)
* [`DataAnnotationsValidator`](xref:blazor/forms/validation#data-annotations-validator-component-and-custom-validation)
* [`EditForm`](xref:blazor/forms/binding#editformeditcontext-model)
* [`InputCheckbox`](xref:blazor/forms/input-components)
* [`InputDate`](xref:blazor/forms/input-components)
* [`InputNumber`](xref:blazor/forms/input-components)
Expand All @@ -159,5 +178,6 @@ The following built-in Razor components are provided by the Blazor framework:
* [`NavMenu`](xref:blazor/fundamentals/routing#navlink-and-navmenu-components)
* [`Router`](xref:blazor/fundamentals/routing#route-templates)
* [`RouteView`](xref:blazor/fundamentals/routing#route-templates)
* [`ValidationSummary`](xref:blazor/forms/validation#validation-summary-and-validation-message-components)

:::moniker-end
2 changes: 0 additions & 2 deletions aspnetcore/blazor/components/render-modes.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,6 @@ Additional information on render mode propagation is provided in the [Render mod

Prerendering is enabled by default for interactive components.

<!-- UPDATE 8.0 Are there any simplifications for these at RTM? -->

To disable prerendering for a *component instance*, pass the `prerender` flag with a value of `false` to the render mode:

* `<... @rendermode="new InteractiveServerRenderMode(prerender: false)" />`
Expand Down
6 changes: 2 additions & 4 deletions aspnetcore/blazor/forms/validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ The validation for the `Defense` ship classification only occurs on the server i
> For more information on security, see:
>
> * <xref:blazor/security/index> (and the other articles in the Blazor *Security and Identity* node)
> * [Microsoft identity platform documentation](/azure/active-directory/develop/)
> * [Microsoft identity platform documentation](/entra/identity-platform/)

`Controllers/StarshipValidation.cs`:

Expand Down Expand Up @@ -911,9 +911,7 @@ Control the style of validation messages in the app's stylesheet (`wwwroot/css/a

## Determine if a form field is valid

<!-- UPDATE 8.0 Add API cross-link -->

Use `EditContext.IsValid(fieldIdentifier)` to determine if a field is valid without obtaining validation messages.
Use <xref:Microsoft.AspNetCore.Components.Forms.EditContext.IsValid%2A?displayProperty=nameWithType> to determine if a field is valid without obtaining validation messages.

<span aria-hidden="true">❌</span> Supported, but not recommended:

Expand Down
10 changes: 5 additions & 5 deletions aspnetcore/blazor/fundamentals/handle-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,14 +298,14 @@ Use the <xref:Microsoft.AspNetCore.Components.Endpoints.RazorComponentsServiceOp
The following example enables detailed errors:

```csharp
builder.Services.AddRazorComponents(options => options.DetailedErrors = true);
builder.Services.AddRazorComponents(options =>
options.DetailedErrors = builder.Environment.IsDevelopment());
```

<!-- UPDATE 8.0 We need to flesh out this warning with the consequences
of enabling detailed errors in production. -->

> [!WARNING]
> Only enable detailed errors in the `Development` environment.
> **Only enable detailed errors in the `Development` environment.** Detailed errors may contain sensitive information about the app that malicious users can use in an attack.
>
> The preceding example provides a degree of safety by setting the value of <xref:Microsoft.AspNetCore.Components.Endpoints.RazorComponentsServiceOptions.DetailedErrors> based on the value returned by <xref:Microsoft.Extensions.Hosting.HostEnvironmentEnvExtensions.IsDevelopment%2A>. When the app is in the `Development` environment, <xref:Microsoft.AspNetCore.Components.Endpoints.RazorComponentsServiceOptions.DetailedErrors> is set to `true`. This approach isn't foolproof because it's possible to host a production app on a public server in the `Development` environment.

:::moniker-end

Expand Down
4 changes: 0 additions & 4 deletions aspnetcore/blazor/fundamentals/signalr.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,6 @@ Configure <xref:Microsoft.AspNetCore.Builder.ComponentEndpointRouteBuilderExtens
* <xref:Microsoft.AspNetCore.Http.Connections.HttpConnectionDispatcherOptions.TransportSendTimeout>
* <xref:Microsoft.AspNetCore.Http.Connections.HttpConnectionDispatcherOptions.WebSockets> (*Read only*)

<!-- UPDATE 8.0 Confirm with the PU because there's a report at
https://github.com/dotnet/AspNetCore.Docs/issues/31113
that this doesn't configure Blazor's hub options. -->

Place the call to `app.MapBlazorHub` after the call to `app.MapRazorComponents` in the app's `Program` file:

```csharp
Expand Down
4 changes: 0 additions & 4 deletions aspnetcore/blazor/host-and-deploy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,6 @@ For the second option, which is the usual approach taken, the app sets the base

### Server-side Blazor

<!-- UPDATE 8.0 Check via PU questions or when the App Base Path issue
https://github.com/dotnet/AspNetCore.Docs/issues/30043
is worked. -->

Map the SignalR hub of a server-side Blazor app by passing the path to <xref:Microsoft.AspNetCore.Builder.ComponentEndpointRouteBuilderExtensions.MapBlazorHub%2A> in the `Program` file:

```csharp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@ The approach demonstrated in this article serves as a starting point for develop

## Experimental NuGet package and sample app

<!-- UPDATE 8.0 Confirm that the package on NuGet indicates
support for only 6.0 and 7.0 at 8.0 RTM. -->

The approach described in this article is used by the *experimental* [`Microsoft.AspNetCore.Components.WebAssembly.MultipartBundle` package (NuGet.org)](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.WebAssembly.MultipartBundle) for .NET 6 and 7 apps. The package contains MSBuild targets to customize the Blazor publish output and a [JavaScript initializer](xref:blazor/js-interop/index#javascript-initializers) to use a custom [boot resource loader](xref:blazor/fundamentals/startup#load-boot-resources), each of which are described in detail later in this article.
The approach described in this article is used by the *experimental* [`Microsoft.AspNetCore.Components.WebAssembly.MultipartBundle` package (NuGet.org)](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.WebAssembly.MultipartBundle) for apps targeting .NET 6 or later. The package contains MSBuild targets to customize the Blazor publish output and a [JavaScript initializer](xref:blazor/js-interop/index#javascript-initializers) to use a custom [boot resource loader](xref:blazor/fundamentals/startup#load-boot-resources), each of which are described in detail later in this article.

[Experimental code (includes the NuGet package reference source and `CustomPackagedApp` sample app)](https://github.com/aspnet/AspLabs/tree/main/src/BlazorWebAssemblyCustomInitialization)

Expand Down
20 changes: 10 additions & 10 deletions aspnetcore/blazor/hybrid/security/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,20 @@ For additional guidance, see the following resources:

:::zone pivot="wpf"

WPF apps use the [Microsoft identity platform](/azure/active-directory/develop/) to integrate with Microsoft Entra (ME-ID) and AAD B2C. For guidance and examples, see the following resources:
WPF apps use the [Microsoft identity platform](/entra/identity-platform/) to integrate with Microsoft Entra (ME-ID) and AAD B2C. For guidance and examples, see the following resources:

* [Overview of the Microsoft Authentication Library (MSAL)](/azure/active-directory/develop/msal-overview)
* [Overview of the Microsoft Authentication Library (MSAL)](/entra/identity-platform/msal-overview)
* [Add authentication to your Windows (WPF) app](/azure/developer/mobile-apps/azure-mobile-apps/quickstarts/wpf/authentication)
* [Tutorial: Sign in users and call Microsoft Graph in Windows Presentation Foundation (WPF) desktop app](/azure/active-directory/develop/tutorial-v2-windows-desktop)
* [Quickstart: Acquire a token and call Microsoft Graph API from a desktop application](/azure/active-directory/develop/desktop-app-quickstart?pivots=devlang-windows-desktop)
* [Tutorial: Sign in users and call Microsoft Graph in Windows Presentation Foundation (WPF) desktop app](/entra/identity-platform/tutorial-v2-windows-desktop)
* [Quickstart: Acquire a token and call Microsoft Graph API from a desktop application](/entra/identity-platform/index-desktop)
* [Quickstart: Set up sign in for a desktop app using Azure Active Directory B2C](/azure/active-directory-b2c/quickstart-native-app-desktop)
* [Configure authentication in a sample WPF desktop app by using Azure AD B2C](/azure/active-directory-b2c/configure-authentication-sample-wpf-desktop-app)

:::zone-end

:::zone pivot="winforms"

Windows Forms apps use the [Microsoft identity platform](/azure/active-directory/develop/) to integrate with Microsoft Entra (ME-ID) and AAD B2C. For more information, see [Overview of the Microsoft Authentication Library (MSAL)](/azure/active-directory/develop/msal-overview).
Windows Forms apps use the [Microsoft identity platform](/entra/identity-platform/) to integrate with Microsoft Entra (ME-ID) and AAD B2C. For more information, see [Overview of the Microsoft Authentication Library (MSAL)](/entra/identity-platform/msal-overview).

:::zone-end

Expand Down Expand Up @@ -578,20 +578,20 @@ For additional guidance, see the following resources:

:::zone pivot="wpf"

WPF apps use the [Microsoft identity platform](/azure/active-directory/develop/) to integrate with Microsoft Entra (ME-ID) and AAD B2C. For guidance and examples, see the following resources:
WPF apps use the [Microsoft identity platform](/entra/identity-platform/) to integrate with Microsoft Entra (ME-ID) and AAD B2C. For guidance and examples, see the following resources:

* [Overview of the Microsoft Authentication Library (MSAL)](/azure/active-directory/develop/msal-overview)
* [Overview of the Microsoft Authentication Library (MSAL)](/entra/identity-platform/msal-overview)
* [Add authentication to your Windows (WPF) app](/azure/developer/mobile-apps/azure-mobile-apps/quickstarts/wpf/authentication)
* [Tutorial: Sign in users and call Microsoft Graph in Windows Presentation Foundation (WPF) desktop app](/azure/active-directory/develop/tutorial-v2-windows-desktop)
* [Quickstart: Acquire a token and call Microsoft Graph API from a desktop application](/azure/active-directory/develop/desktop-app-quickstart?pivots=devlang-windows-desktop)
* [Tutorial: Sign in users and call Microsoft Graph in Windows Presentation Foundation (WPF) desktop app](/entra/identity-platform/tutorial-v2-windows-desktop)
* [Quickstart: Acquire a token and call Microsoft Graph API from a desktop application](/entra/identity-platform/index-desktop)
* [Quickstart: Set up sign in for a desktop app using Azure Active Directory B2C](/azure/active-directory-b2c/quickstart-native-app-desktop)
* [Configure authentication in a sample WPF desktop app by using Azure AD B2C](/azure/active-directory-b2c/configure-authentication-sample-wpf-desktop-app)

:::zone-end

:::zone pivot="winforms"

Windows Forms apps use the [Microsoft identity platform](/azure/active-directory/develop/) to integrate with Microsoft Entra (ME-ID) and AAD B2C. For more information, see [Overview of the Microsoft Authentication Library (MSAL)](/azure/active-directory/develop/msal-overview).
Windows Forms apps use the [Microsoft identity platform](/entra/identity-platform/) to integrate with Microsoft Entra (ME-ID) and AAD B2C. For more information, see [Overview of the Microsoft Authentication Library (MSAL)](/entra/identity-platform/msal-overview).

:::zone-end

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
> [!IMPORTANT]
> If you don't have the authority to grant admin consent to the tenant in the last step of **API permissions** configuration because consent to use the app is delegated to users, then you must take the following additional steps:
>
> * The app must use a [trusted publisher domain](/azure/active-directory/develop/howto-configure-publisher-domain).
> * The app must use a [trusted publisher domain](/entra/identity-platform/howto-configure-publisher-domain).
> * In the **`Server`** app's configuration in the Azure portal, select **Expose an API**. Under **Authorized client applications**, select the button to **Add a client application**. Add the **`Client`** app's Application (client) ID (for example, `4369008b-21fa-427c-abaa-9b53bf58e538`).
4 changes: 2 additions & 2 deletions aspnetcore/blazor/security/includes/troubleshoot.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ To enable debug or trace logging for Blazor WebAssembly authentication, see <xre

To resolve the error:

1. In the Azure portal, access the [app's manifest](/azure/active-directory/develop/reference-app-manifest).
1. Set the [`allowPublicClient` attribute](/azure/active-directory/develop/reference-app-manifest#allowpublicclient-attribute) to `null` or `true`.
1. In the Azure portal, access the [app's manifest](/entra/identity-platform/reference-app-manifest).
1. Set the [`allowPublicClient` attribute](/entra/identity-platform/reference-app-manifest#allowpublicclient-attribute) to `null` or `true`.

### Cookies and site data

Expand Down
Loading