Blazor 10.0

Last reviewed Sep 24, 2026

Export as PDF

Prompt Details

Prompt Composition

3prompts
  1. C# 14106 lines · 4.4K tokens
  2. ASP.NET Core 10.065 lines · 3.5K tokens
  3. Blazor 10.080 lines · 3.4K tokens
Total251 lines · 11.3K tokens

CWE Coverage

  • 20
  • 22
  • 59
  • 73
  • 78
  • 79
  • 89
  • 94
  • 95
  • 117
  • 190
  • 201
  • 203
  • 208
  • 209
  • 214
  • 257
  • 295
  • 307
  • 312
  • 319
  • 323
  • 327
  • 338
  • 352
  • 362
  • 367
  • 378
  • 426
  • 434
  • 488
  • 502
  • 524
  • 525
  • 532
  • 552
  • 601
  • 602
  • 611
  • 613
  • 614
  • 636
  • 639
  • 674
  • 698
  • 759
  • 770
  • 772
  • 775
  • 778
  • 798
  • 807
  • 862
  • 863
  • 915
  • 916
  • 918
  • 922
  • 942
  • 1004
  • 1021
  • 1173
  • 1275
  • 1333
  • 1385
  • 1395

Prompt Preview

Apply the ASP.NET Core 10.0 and C# 14 prompts first. Target net10.0 with supported .NET 10 servicing updates. These rules cover Blazor Web Apps and standalone Blazor WebAssembly, including static SSR, Interactive Server, Interactive WebAssembly, and Interactive Auto.

Render modes and trust

  • Treat code, configuration, and data shipped in the .Client project or standalone WebAssembly output as browser-accessible; keep confidential code and privileged credentials in server services.
  • Authorize both the server service used during SSR and the API used during client rendering of an Interactive Auto component; an API's authorization metadata doesn't protect direct server service calls.
  • Keep OnInitializedAsync free of irreversible mutations: prerendering and interactive initialization can execute separately. Make explicitly requested writes safe against duplicate events, retries, and restored UI state.
  • Return explicitly after NavigationManager.NavigateTo when redirecting on failed authorization or validation. .NET 10 templates set BlazorDisableThrowNavigationException to true, so static SSR can continue executing code after navigation; a redirect isn't an execution barrier.

Authentication and authorization

  • Use [Authorize] on routed @page components and AuthorizeRouteView for interactive routing. Child components aren't protected by their own [Authorize] attributes; static SSR authorization runs in the ASP.NET Core pipeline.
  • Enforce resource and tenant policies inside server event handlers and services before returning data or mutating it;