Skip to content

Commit 9a29e6b

Browse files
Merge pull request #34266 from dotnet/main
Merge to Live
2 parents e30b913 + f887937 commit 9a29e6b

File tree

154 files changed

+61909
-73
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+61909
-73
lines changed

aspnetcore/blazor/components/quickgrid.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,18 +138,36 @@ To provide a UI for pagination, add a [`Paginator` component](xref:Microsoft.Asp
138138

139139
In the running app, page through the items using a rendered `Paginator` component.
140140

141-
QuickGrid renders additional empty rows to fill in the final page of data when used with a `Paginator` component. In .NET 9 or later, empty data cells (`<td></td>`) are added to the empty rows. The empty rows are intended to facilitate rendering the QuickGrid with stable row height and styling across all pages. You can apply styles to the rows using [CSS isolation](xref:blazor/components/css-isolation) by wrapping the `QuickGrid` component in a wrapper element, such as a `<div>`, and applying a row style with `::deep` [pseudo-elements](https://developer.mozilla.org/docs/Web/CSS/Pseudo-elements):
141+
QuickGrid renders additional empty rows to fill in the final page of data when used with a `Paginator` component. In .NET 9 or later, empty data cells (`<td></td>`) are added to the empty rows. The empty rows are intended to facilitate rendering the QuickGrid with stable row height and styling across all pages.
142+
143+
## Apply row styles
144+
145+
Apply styles to rows using [CSS isolation](xref:blazor/components/css-isolation), which can include styling empty rows for `QuickGrid` components that [page data with a `Paginator` component](#page-items-with-a-paginator-component).
146+
147+
Wrap the `QuickGrid` component in a wrapper block element, for example a `<div>`:
148+
149+
```diff
150+
+ <div>
151+
<QuickGrid ...>
152+
...
153+
</QuickGrid>
154+
+ </div>
155+
```
156+
157+
Apply a row style with the `::deep` [pseudo-element](https://developer.mozilla.org/docs/Web/CSS/Pseudo-elements). In the following example, row height is set to `2em`, including for empty data rows.
158+
159+
`{COMPONENT}.razor.css`:
142160

143161
```css
144162
::deep tr {
145163
height: 2em;
146164
}
147165
```
148166

149-
To hide the empty row data cells rendered by the QuickGrid, use CSS styling. In the following isolated CSS styles:
167+
Alternatively, use the following CSS styling approach:
150168

151-
* Row cells populated with data are displayed.
152-
* Empty row data cells aren't displayed, which avoids empty row cell borders from rendering per Bootstrap styling.
169+
* Display row cells populated with data.
170+
* Don't display empty row cells, which avoids empty row cell borders from rendering per Bootstrap styling.
153171

154172
`{COMPONENT}.razor.css`:
155173

aspnetcore/blazor/file-uploads.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -259,15 +259,15 @@ public class UploadResult
259259

260260
A security best practice for production apps is to avoid sending error messages to clients that might reveal sensitive information about an app, server, or network. Providing detailed error messages can aid a malicious user in devising attacks on an app, server, or network. The example code in this section only sends back an error code number (`int`) for display by the component client-side if a server-side error occurs. If a user requires assistance with a file upload, they provide the error code to support personnel for support ticket resolution without ever knowing the exact cause of the error.
261261

262-
<!-- UPDATE 9.0 HOLD moniker range="< aspnetcore-9.0" -->
262+
<!-- UPDATE 10.0 HOLD moniker range="< aspnetcore-9.0" Tracking PU bug: https://github.com/dotnet/aspnetcore/issues/47301 -->
263263

264264
The following `LazyBrowserFileStream` class defines a custom stream type that lazily calls <xref:Microsoft.AspNetCore.Components.Forms.IBrowserFile.OpenReadStream%2A> just before the first bytes of the stream are requested. The stream isn't transmitted from the browser to the server until reading the stream begins in .NET.
265265

266266
`LazyBrowserFileStream.cs`:
267267

268-
<!-- UPDATE 9.0 HOLD moniker-end -->
268+
<!-- UPDATE 10.0 HOLD moniker-end -->
269269

270-
<!-- UPDATE 9.0 HOLD for next line: < aspnetcore-9.0 -->
270+
<!-- UPDATE 10.0 HOLD for next line: < aspnetcore-9.0 -->
271271

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

@@ -332,7 +332,7 @@ The following `FileUpload2` component:
332332

333333
:::moniker-end
334334

335-
<!-- UPDATE 9.0 HOLD for the next line: < aspnetcore-9.0 -->
335+
<!-- UPDATE 10.0 HOLD for the next line: < aspnetcore-9.0 -->
336336

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

@@ -909,10 +909,6 @@ For more information on SignalR configuration and how to set <xref:Microsoft.Asp
909909

910910
## Maximum parallel invocations per client hub setting
911911

912-
<!-- UPDATE 9.0 Check on a fix for this per
913-
https://github.com/dotnet/aspnetcore/issues/53951
914-
and version if fixed. -->
915-
916912
Blazor relies on <xref:Microsoft.AspNetCore.SignalR.HubOptions.MaximumParallelInvocationsPerClient%2A> set to 1, which is the default value.
917913

918914
Increasing the value leads to a high probability that `CopyTo` operations throw `System.InvalidOperationException: 'Reading is not allowed after reader was completed.'`. For more information, see [MaximumParallelInvocationsPerClient > 1 breaks file upload in Blazor Server mode (`dotnet/aspnetcore` #53951)](https://github.com/dotnet/aspnetcore/issues/53951).
@@ -925,13 +921,11 @@ The line that calls <xref:Microsoft.AspNetCore.Components.Forms.IBrowserFile.Ope
925921
926922
Possible causes:
927923

928-
<!-- UPDATE 9.0 HOLD: in versions of ASP.NET Core earlier than 9.0 -->
929-
930924
* Using the [Autofac Inversion of Control (IoC) container](https://autofac.org/) instead of the built-in ASP.NET Core dependency injection container. To resolve the issue, set <xref:Microsoft.AspNetCore.SignalR.HubOptions.DisableImplicitFromServicesParameters%2A> to `true` in the [server-side circuit handler hub options](xref:blazor/fundamentals/signalr#server-side-circuit-handler-options). For more information, see [FileUpload: Did not receive any data in the allotted time (`dotnet/aspnetcore` #38842)](https://github.com/dotnet/aspnetcore/issues/38842#issuecomment-1342540950).
931925

932926
* Not reading the stream to completion. This isn't a framework issue. Trap the exception and investigate it further in your local environment/network.
933927

934-
<!-- UPDATE 9.0 HOLD in versions of ASP.NET Core earlier than 9.0
928+
<!-- UPDATE 10.0 HOLD in versions of ASP.NET Core earlier than 9.0
935929
adopt ***either*** of the following approaches: * Upgrade the app to ASP.NET Core 9.0 or later.
936930
with the article version selector set to "ASP.NET Core in .NET 8" or earlier -->
937931

aspnetcore/blazor/host-and-deploy/server.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,7 @@ The service isn't required for Blazor apps hosted in Azure App Service or Azure
9595

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

98-
<!-- UPDATE 9.0 Update section to only cross-link stateful
99-
reconnect guidance after the feature is
100-
supported with Azure SignalR Service. -->
101-
102-
> [!NOTE]
103-
> [Stateful reconnect](xref:signalr/configuration#configure-stateful-reconnect) (<xref:Microsoft.AspNetCore.SignalR.Client.HubConnectionBuilderHttpExtensions.WithStatefulReconnect%2A>) was released with .NET 8 but isn't currently supported for the Azure SignalR Service. For more information, see [Stateful Reconnect Support? (`Azure/azure-signalr` #1878)](https://github.com/Azure/azure-signalr/issues/1878).
98+
The Azure SignalR Service with SDK [v1.26.1](https://github.com/Azure/azure-signalr/releases/tag/v1.26.1) or later supports [SignalR stateful reconnect](xref:signalr/configuration#configure-stateful-reconnect) (<xref:Microsoft.AspNetCore.SignalR.Client.HubConnectionBuilderHttpExtensions.WithStatefulReconnect%2A>).
10499

105100
:::moniker-end
106101

aspnetcore/blazor/hybrid/class-libraries.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,25 +48,20 @@ For more information, see the following articles:
4848

4949
:::moniker-end
5050

51-
<!-- UPDATE 9.0 Ask Beth on a replacement for this
52-
5351
## Sample app
5452

55-
For an example of the scenarios described in this article, see the .NET Podcasts sample app:
53+
For an example of the scenarios described in this article, see the [eShop Reference Application (AdventureWorks) (`dotnet/eShop` GitHub repository)](https://github.com/dotnet/eShop). The .NET MAUI Blazor Hybrid app is in the `src/HybridApp` folder.
5654

57-
* [GitHub repository (`microsoft/dotnet-podcasts`)](https://github.com/microsoft/dotnet-podcasts)
58-
* [Running sample app (Azure Container Apps Service)](https://dotnetpodcasts.azurewebsites.net/)
55+
For a version of the sample app tailored for Azure hosting, see the [`Azure-Samples/eShopOnAzure` GitHub repository](https://github.com/Azure-Samples/eShopOnAzure).
5956

60-
The .NET Podcasts app showcases the following technologies:
57+
The sample app showcases the following technologies:
6158

6259
* [.NET](https://dotnet.microsoft.com/download/dotnet)
6360
* [ASP.NET Core](https://dotnet.microsoft.com/apps/aspnet)
6461
* [Blazor](https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor)
6562
* [.NET MAUI](https://dotnet.microsoft.com/apps/maui)
66-
* [Azure Container Apps](https://azure.microsoft.com/services/container-apps/)
67-
* [Orleans](/dotnet/orleans/overview)
68-
69-
-->
63+
* [.NET Aspire](/dotnet/aspire/get-started/aspire-overview)
64+
* [Docker](https://docs.docker.com/get-started/docker-overview/)
7065

7166
## Share web UI Razor components, code, and static assets
7267

aspnetcore/blazor/hybrid/reuse-razor-components.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,8 @@ For an example, see <xref:blazor/hybrid/tutorials/maui-blazor-web-app#using-inte
7575

7676
:::moniker-end
7777

78-
<!-- UPDATE 9.0 Ask Beth on a replacement for this
79-
8078
## Additional resources
8179

82-
* .NET MAUI Blazor podcast sample app
83-
* [Source code (`microsoft/dotnet-podcasts` GitHub repository)](https://github.com/microsoft/dotnet-podcasts)
84-
* [Live app](https://dotnetpodcasts.azurewebsites.net/)
85-
86-
-->
80+
* eShop Reference Application (AdventureWorks): The .NET MAUI Blazor Hybrid app is in the `src/HybridApp` folder.
81+
* For Azure hosting: [`Azure-Samples/eShopOnAzure` GitHub repository](https://github.com/Azure-Samples/eShopOnAzure)
82+
* For general non-Azure hosting: [`dotnet/eShop` GitHub repository](https://github.com/dotnet/eShop).

aspnetcore/blazor/performance.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public static RenderFragment SayHello = @<h1>Hello!</h1>;
195195
}
196196
```
197197

198-
The preceding approach reuses rendering logic without per-component overhead. However, the approach doesn't permit refreshing the subtree of the UI independently, nor does it have the ability to skip rendering the subtree of the UI when its parent renders because there's no component boundary. Assignment to a <xref:Microsoft.AspNetCore.Components.RenderFragment> delegate is only supported in Razor component files (`.razor`), and [event callbacks](xref:blazor/components/event-handling#eventcallback) aren't supported.
198+
The preceding approach reuses rendering logic without per-component overhead. However, the approach doesn't permit refreshing the subtree of the UI independently, nor does it have the ability to skip rendering the subtree of the UI when its parent renders because there's no component boundary. Assignment to a <xref:Microsoft.AspNetCore.Components.RenderFragment> delegate is only supported in Razor component files (`.razor`).
199199

200200
For a non-static field, method, or property that can't be referenced by a field initializer, such as `TitleTemplate` in the following example, use a property instead of a field for the <xref:Microsoft.AspNetCore.Components.RenderFragment>:
201201

@@ -248,7 +248,7 @@ The [`CascadingValue` component](xref:blazor/components/cascading-values-and-par
248248

249249
Setting `IsFixed` to `true` improves performance if there are a large number of other components that receive the cascaded value. Wherever possible, set `IsFixed` to `true` on cascaded values. You can set `IsFixed` to `true` when the supplied value doesn't change over time.
250250

251-
Where a component passes `this` as a cascaded value, `IsFixed` can also be set to `true`:
251+
Where a component passes `this` as a cascaded value, `IsFixed` can also be set to `true`, because `this` never changes during the component's lifecycle:
252252

253253
```razor
254254
<CascadingValue Value="this" IsFixed="true">

aspnetcore/blazor/security/blazor-web-app-with-oidc.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -731,11 +731,6 @@ At this point, Razor components can adopt [role-based and policy-based authoriza
731731

732732
Use the guidance in this section to implement application roles, ME-ID security groups, and ME-ID built-in administrator roles for apps using [Microsoft Entra ID (ME-ID)](https://www.microsoft.com/security/business/microsoft-entra).
733733

734-
<!-- UPDATE 9.0 If we end up with a BWA + MS Identity Web article
735-
and sample, this section will be removed in favor
736-
of coverage of using Graph for groups/roles in the
737-
new article. -->
738-
739734
The approach described in this section configures ME-ID to send groups and roles in the authentication cookie header. When users are only a member of a few security groups and roles, the following approach should work for most hosting platforms without running into a problem where headers are too long, for example with IIS hosting that has a default header length limit of 16 KB (`MaxRequestBytes`). If header length is a problem due to high group or role membership, we recommend not following the guidance in this section in favor of implementing [Microsoft Graph](/graph/sdks/sdks-overview) to obtain a user's groups and roles from ME-ID separately, an approach that doesn't inflate the size of the authentication cookie. For more information, see [Bad Request - Request Too Long - IIS Server (`dotnet/aspnetcore` #57545)](https://github.com/dotnet/aspnetcore/issues/57545).
740735

741736
Configure the role claim type (<xref:Microsoft.IdentityModel.Tokens.TokenValidationParameters.RoleClaimType?displayProperty=nameWithType>) in <xref:Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectOptions> of `Program.cs`. Set the value to `roles`:

aspnetcore/blazor/security/index.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,10 +283,6 @@ For a description on how global interactive render modes are applied to non-Iden
283283

284284
For more information on persisting prerendered state, see <xref:blazor/components/prerender#persist-prerendered-state>.
285285

286-
<!-- UPDATE 9.0 Remove blog post cross-link -->
287-
288-
For more information on the Blazor Identity UI and guidance on integrating external logins through social websites, see [What's new with identity in .NET 8](https://devblogs.microsoft.com/dotnet/whats-new-with-identity-in-dotnet-8/#the-blazor-identity-ui).
289-
290286
[!INCLUDE[](~/includes/aspnetcore-repo-ref-source-links.md)]
291287

292288
### Manage authentication state in Blazor Web Apps

aspnetcore/blazor/test.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,5 @@ The following actions take place at each step of the test:
163163
164164
## Additional resources
165165

166-
<!-- UPDATE 9.0 Check on staleness of Oslo talk link -->
167-
168166
* [Getting Started with bUnit](https://bunit.dev/docs/getting-started/): bUnit instructions include guidance on creating a test project, referencing testing framework packages, and building and running tests.
169-
* [How to create maintainable and testable Blazor components - Egil Hansen - NDC Oslo 2022](https://www.youtube.com/watch?v=L_n-12FglLI)
167+
* [Blazor Testing from A to Z - Egil Hansen - Swetugg Stockholm 2024](https://youtu.be/GU_XbWjrP_g?si=1SrjeaP1T9LdFegN) ([Swetugg](https://www.swetugg.se/sthlm-2025))

aspnetcore/blazor/tutorials/movie-database-app/part-2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ When you select the **:::no-loc text="Create":::** button, the movie data is pos
417417

418418
:::moniker range=">= aspnetcore-9.0"
419419

420-
<!-- UPDATE 9.0 Revert when debugger is updated -->
420+
<!-- UPDATE 10.0 Revert when https://github.com/dotnet/aspnetcore/issues/53996 is addressed -->
421421

422422
:::zone pivot="vs"
423423

0 commit comments

Comments
 (0)