Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
guardrex committed Nov 15, 2024
1 parent 705c9aa commit f734666
Show file tree
Hide file tree
Showing 17 changed files with 31 additions and 35 deletions.
8 changes: 4 additions & 4 deletions .openpublishing.redirection.json
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,7 @@
},
{
"source_path": "aspnetcore/blazor/integrate-components.md",
"redirect_url": "/aspnet/core/blazor/components/prerendering-and-integration",
"redirect_url": "/aspnet/core/blazor/components/integration",
"redirect_document_id": false
},
{
Expand Down Expand Up @@ -1157,7 +1157,7 @@
},
{
"source_path": "aspnetcore/blazor/components/integrate-components-into-razor-pages-and-mvc-apps.md",
"redirect_url": "/aspnet/core/blazor/components/prerendering-and-integration",
"redirect_url": "/aspnet/core/blazor/components/integration",
"redirect_document_id": false
},
{
Expand Down Expand Up @@ -1319,8 +1319,8 @@
"redirect_document_id": false
},
{
"source_path": "aspnetcore/blazor/components/integration.md",
"redirect_url": "/aspnet/core/blazor/components/prerendering-and-integration",
"source_path": "aspnetcore/blazor/components/prerendering-and-integration.md",
"redirect_url": "/aspnet/core/blazor/components/integration",
"redirect_document_id": false
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: Prerender and integrate ASP.NET Core Razor components
title: Integrate ASP.NET Core Razor components
author: guardrex
description: Learn about Razor component integration scenarios for Blazor apps, including prerendering of Razor components on the server.
monikerRange: '>= aspnetcore-3.1'
ms.author: riande
ms.custom: mvc
ms.date: 02/09/2024
uid: blazor/components/prerendering-and-integration
uid: blazor/components/integration
zone_pivot_groups: blazor-hosting-models
---
# Prerender and integrate ASP.NET Core Razor components
Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/blazor/fundamentals/signalr.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ If prerendering is configured, prerendering occurs before the client connection
If prerendering is configured, prerendering occurs before the client connection to the server is established. For more information, see the following articles:

* <xref:mvc/views/tag-helpers/builtin-th/component-tag-helper>
* <xref:blazor/components/prerendering-and-integration>
* <xref:blazor/components/integration>

:::moniker-end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ The preceding configurations are beyond the scope of this article. For more info

* [Host and deploy articles](xref:host-and-deploy/index)
* <xref:security/enforcing-ssl>
* <xref:blazor/components/prerendering-and-integration?pivots=webassembly>
* <xref:blazor/components/integration?pivots=webassembly>

Use an existing hosted Blazor WebAssembly [solution](xref:blazor/tooling#visual-studio-solution-file-sln) or create a [new hosted Blazor WebAssembly solution](xref:blazor/tooling) from the Blazor WebAssembly project template by passing the `-ho|--hosted` option if using the .NET CLI or selecting the **ASP.NET Core Hosted** checkbox in Visual Studio when the project is created in the IDE.

Expand Down Expand Up @@ -453,7 +453,7 @@ public class HomeController : Controller
> [!NOTE]
> The preceding `Index` view is a minimal example purely for demonstration purposes. If the app requires additional MVC assets, such as a layout, styles, scripts, and imports, obtain them from an app created from the MVC project template. For more information, see <xref:tutorials/first-mvc-app/start-mvc>.
For more information on using the Razor components from either of the client apps in pages or views of the server app, see <xref:blazor/components/prerendering-and-integration?pivots=webassembly>.
For more information on using the Razor components from either of the client apps in pages or views of the server app, see <xref:blazor/components/integration?pivots=webassembly>.

## Run the app

Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/blazor/includes/prerendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

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

*This section applies to server-side apps and hosted Blazor WebAssembly apps that prerender Razor components. Prerendering is covered in <xref:blazor/components/prerendering-and-integration>.*
*This section applies to server-side apps and hosted Blazor WebAssembly apps that prerender Razor components. Prerendering is covered in <xref:blazor/components/integration>.*

:::moniker-end

Expand Down
6 changes: 2 additions & 4 deletions aspnetcore/blazor/security/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,16 @@ Security scenarios differ between authorization code running server-side and cli

If authorization rule enforcement must be guaranteed, don't implement authorization checks in client-side code. Build a Blazor Web App that only relies on server-side rendering (SSR) for authorization checks and rule enforcement.

[Razor Pages authorization conventions](xref:security/authorization/razor-pages-authorization) don't apply to routable Razor components. If a non-routable Razor component is [embedded in a page of a Razor Pages app](xref:blazor/components/integration), the page's authorization conventions indirectly affect the Razor component along with the rest of the page's content.

:::moniker-end

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

If authorization rule enforcement and the security of data and code must be guaranteed, don't develop a client-side app. Build a Blazor Server app.

[Razor Pages authorization conventions](xref:security/authorization/razor-pages-authorization) don't apply to routable Razor components. If a non-routable Razor component is [embedded in a page of a Razor Pages app](xref:blazor/components/prerendering-and-integration), the page's authorization conventions indirectly affect the Razor component along with the rest of the page's content.

:::moniker-end

[Razor Pages authorization conventions](xref:security/authorization/razor-pages-authorization) don't apply to routable Razor components. If a non-routable Razor component is [embedded in a page of a Razor Pages app](xref:blazor/components/integration), the page's authorization conventions indirectly affect the Razor component along with the rest of the page's content.

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

ASP.NET Core Identity is designed to work in the context of HTTP request and response communication, which generally isn't the Blazor app client-server communication model. ASP.NET Core apps that use ASP.NET Core Identity for user management should use Razor Pages instead of Razor components for Identity-related UI, such as user registration, login, logout, and other user management tasks. Building Razor components that directly handle Identity tasks is possible for several scenarios but isn't recommended or supported by Microsoft.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1283,7 +1283,7 @@ To configure a Blazor WebAssembly app to use the [ASP.NET Core gRPC framework](x
:::moniker range="< aspnetcore-8.0"

> [!NOTE]
> Prerendering is enabled by default in hosted Blazor WebAssembly apps, so you must account for the component rendering first from the server and then from the client. Any prerendered state should flow to the client so that it can be reused. For more information, see <xref:blazor/components/prerendering-and-integration?pivots=webassembly#persist-prerendered-state>.
> Prerendering is enabled by default in hosted Blazor WebAssembly apps, so you must account for the component rendering first from the server and then from the client. Any prerendered state should flow to the client so that it can be reused. For more information, see <xref:blazor/components/integration?pivots=webassembly#persist-prerendered-state>.

:::moniker-end

Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/blazor/security/webassembly/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ For examples, see the following resources:

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

[Prerendering](xref:blazor/components/prerendering-and-integration) isn't supported for authentication endpoints (`/authentication/` path segment).
[Prerendering](xref:blazor/components/integration) isn't supported for authentication endpoints (`/authentication/` path segment).

:::moniker-end

Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/migration/30-to-31.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ ASP.NET Core 3.1 introduces a `Component` Tag Helper. The Tag Helper can replace
+ <component type="typeof(Counter)" render-mode="ServerPrerendered" param-IncrementAmount="10" />
```

For more information, see <xref:blazor/components/prerendering-and-integration?view=aspnetcore-3.1&preserve-view=true>.
For more information, see <xref:blazor/components/integration?view=aspnetcore-3.1&preserve-view=true>.

## ASP.NET Core Module (ANCM)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ Follow the guidance in the *Use non-routable components in pages or views* secti

Follow the guidance in the *Configuration* section for either:

* [Blazor Server](xref:blazor/components/prerendering-and-integration?pivots=server): Integrate routable and non-routable Razor components into Razor Pages and MVC apps.
* [Blazor WebAssembly](xref:blazor/components/prerendering-and-integration?pivots=webassembly): Integrate Razor components from a hosted Blazor WebAssembly solution into Razor Pages and MVC apps.
* [Blazor Server](xref:blazor/components/integration?pivots=server): Integrate routable and non-routable Razor components into Razor Pages and MVC apps.
* [Blazor WebAssembly](xref:blazor/components/integration?pivots=webassembly): Integrate Razor components from a hosted Blazor WebAssembly solution into Razor Pages and MVC apps.

:::moniker-end

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

Follow the guidance in the *Configuration* section of the <xref:blazor/components/prerendering-and-integration?pivots=server> article.
Follow the guidance in the *Configuration* section of the <xref:blazor/components/integration?pivots=server> article.

:::moniker-end

Expand Down Expand Up @@ -343,7 +343,7 @@ The preceding example assumes that the `ParameterComponent` component is in the
:::moniker range=">= aspnetcore-6.0 < aspnetcore-8.0"

* <xref:mvc/views/tag-helpers/builtin-th/persist-component-state-tag-helper>
* <xref:blazor/components/prerendering-and-integration>
* <xref:blazor/components/integration>
* <xref:Microsoft.AspNetCore.Mvc.TagHelpers.ComponentTagHelper>
* <xref:mvc/views/tag-helpers/intro>
* <xref:blazor/components/index>
Expand All @@ -352,7 +352,7 @@ The preceding example assumes that the `ParameterComponent` component is in the

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

* <xref:blazor/components/prerendering-and-integration>
* <xref:blazor/components/integration>
* <xref:Microsoft.AspNetCore.Mvc.TagHelpers.ComponentTagHelper>
* <xref:mvc/views/tag-helpers/intro>
* <xref:blazor/components/index>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ Follow the guidance in the *Use non-routable components in pages or views* secti

Follow the guidance in the *Configuration* section for either:

* [Blazor WebAssembly](xref:blazor/components/prerendering-and-integration?pivots=webassembly)
* [Blazor Server](xref:blazor/components/prerendering-and-integration?pivots=server)
* [Blazor WebAssembly](xref:blazor/components/integration?pivots=webassembly)
* [Blazor Server](xref:blazor/components/integration?pivots=server)

:::moniker-end

Expand Down Expand Up @@ -71,7 +71,7 @@ In `Pages/_Host.cshtml` of Blazor apps that are either WebAssembly prerendered (

Decide what state to persist using the <xref:Microsoft.AspNetCore.Components.PersistentComponentState> service. [`PersistentComponentState.RegisterOnPersisting`](xref:Microsoft.AspNetCore.Components.PersistentComponentState.RegisterOnPersisting%2A) registers a callback to persist the component state before the app is paused. The state is retrieved when the application resumes.

For more information and examples, see <xref:blazor/components/prerendering-and-integration#persist-prerendered-state>.
For more information and examples, see <xref:blazor/components/integration#persist-prerendered-state>.

:::moniker-end

Expand All @@ -90,7 +90,7 @@ For more information and examples, see <xref:blazor/components/prerendering-and-
:::moniker range="< aspnetcore-8.0"

* <xref:mvc/views/tag-helpers/builtin-th/component-tag-helper>
* <xref:blazor/components/prerendering-and-integration>
* <xref:blazor/components/integration>
* <xref:Microsoft.AspNetCore.Mvc.TagHelpers.ComponentTagHelper>
* <xref:mvc/views/tag-helpers/intro>
* <xref:blazor/components/index>
Expand Down
4 changes: 2 additions & 2 deletions aspnetcore/mvc/views/view-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ A view component consists of two parts:

Like controllers, a view component can be a POCO, but most developers take advantage of the methods and properties available by deriving from <xref:Microsoft.AspNetCore.Mvc.ViewComponent>.

When considering if view components meet an app's specifications, consider using Razor components instead. Razor components also combine markup with C# code to produce reusable UI units. Razor components are designed for developer productivity when providing client-side UI logic and composition. For more information, see <xref:blazor/components/index>. For information on how to incorporate Razor components into an MVC or Razor Pages app, see <xref:blazor/components/prerendering-and-integration?pivots=server>.
When considering if view components meet an app's specifications, consider using Razor components instead. Razor components also combine markup with C# code to produce reusable UI units. Razor components are designed for developer productivity when providing client-side UI logic and composition. For more information, see <xref:blazor/components/index>. For information on how to incorporate Razor components into an MVC or Razor Pages app, see <xref:blazor/components/integration?pivots=server>.

## Create a view component

Expand Down Expand Up @@ -655,7 +655,7 @@ View components are intended anywhere you have reusable rendering logic that's t

A view component consists of two parts: the class (typically derived from <xref:Microsoft.AspNetCore.Mvc.ViewComponent>) and the result it returns (typically a view). Like controllers, a view component can be a [POCO](https://stackoverflow.com/questions/250001/poco-definition), but most developers take advantage of the methods and properties available by deriving from `ViewComponent`.

When considering if view components meet an app's specifications, consider using Razor components instead. Razor components also combine markup with C# code to produce reusable UI units. Razor components are designed for developer productivity when providing client-side UI logic and composition. For more information, see <xref:blazor/components/index>. For information on how to incorporate Razor components into an MVC or Razor Pages app, see <xref:blazor/components/prerendering-and-integration?pivots=server>.
When considering if view components meet an app's specifications, consider using Razor components instead. Razor components also combine markup with C# code to produce reusable UI units. Razor components are designed for developer productivity when providing client-side UI logic and composition. For more information, see <xref:blazor/components/index>. For information on how to incorporate Razor components into an MVC or Razor Pages app, see <xref:blazor/components/integration?pivots=server>.

## Creating a view component

Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/release-notes/aspnetcore-3.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ For example, prerender a `Counter` component with an increment amount (`Incremen
param-IncrementAmount="10" />
```

For more information, see [Integrate components into Razor Pages and MVC apps](xref:blazor/components/prerendering-and-integration?view=aspnetcore-3.1&preserve-view=true).
For more information, see [Integrate components into Razor Pages and MVC apps](xref:blazor/components/integration?view=aspnetcore-3.1&preserve-view=true).

## Support for shared queues in HTTP.sys

Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/release-notes/aspnetcore-6.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ Blazor WebAssembly supports ahead-of-time (AOT) compilation, where you can compi

### Persist prerendered state

Blazor supports persisting state in a prerendered page so that the state doesn't need to be recreated when the app is fully loaded. For more information, see <xref:blazor/components/prerendering-and-integration?view=aspnetcore-6.0&pivots=server#persist-prerendered-state>.
Blazor supports persisting state in a prerendered page so that the state doesn't need to be recreated when the app is fully loaded. For more information, see <xref:blazor/components/integration?view=aspnetcore-6.0&pivots=server#persist-prerendered-state>.

### Error boundaries

Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ items:
- name: QuickGrid component
uid: blazor/components/quickgrid
- name: Prerender and integrate components
uid: blazor/components/prerendering-and-integration
uid: blazor/components/integration
- name: Class libraries
uid: blazor/components/class-libraries
- name: Class libraries with static SSR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,13 @@ Benefits for MVC or Razor Pages plus Blazor, in addition to MVC or Razor Pages b

To get started with ASP.NET Core MVC or Razor Pages plus Blazor, see <xref:blazor/components/integration>.

To get started with ASP.NET Core MVC or Razor Pages plus Blazor, see <xref:blazor/components/prerendering-and-integration>.

## Next steps

For more information, see:

* <xref:blazor/index>
* <xref:blazor/hosting-models>
* <xref:blazor/components/prerendering-and-integration>
* <xref:blazor/components/integration>
* <xref:grpc/comparison>

:::moniker-end
2 changes: 1 addition & 1 deletion aspnetcore/whats-new/dotnet-AspNetCore.Docs-mod0.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Welcome to what's new in the ASP.NET Core docs for June 2024. This article lists
- Update Apache coverage (drop CentOS mentions)
- Fix spacing in Apache configuration example
- <xref:blazor/js-interop/import-export-interop> - Import-Export interop: collocated JS with RCL
- <xref:blazor/components/prerendering-and-integration> - Use 'reconnection UI' for all references
- <xref:blazor/components/integration> - Use 'reconnection UI' for all references
- <xref:blazor/security/blazor-web-app-oidc> - Interactive SSR RCs in global WASM/Auto projects
- <xref:blazor/security/server/index> - Simplified auth state serialization for BWAs
- <xref:blazor/tooling> - Change Tooling article content layout
Expand Down

0 comments on commit f734666

Please sign in to comment.