loading experience

.NET

ASP.NET Core 11: everything that's new

A complete guide to ASP.NET Core 11: Blazor, SignalR, minimal APIs, OpenAPI, authentication, Kestrel and performance.

ASP.NET Core 11 ships with .NET 11 and brings a long list of changes across Blazor, SignalR, minimal APIs, OpenAPI, authentication, Kestrel and tooling. This guide walks through them area by area, following Microsoft's official release notes. Where a feature is experimental or opt-in, we say so.

Blazor: components and forms

  • DisplayName<TValue> shows a property's name from [Display] (recommended, and it enables localization) or [DisplayName], falling back to the property name.
  • BasePath: the <BasePath /> component renders the <base href> tag automatically in Blazor Web Apps.
  • Relative navigation: the RelativeToCurrentUri parameter (default false) on NavigateTo and NavLink resolves URIs against the current page path.
  • GetUriWithFragment: a NavigationManager extension that builds URIs with hash fragments without allocations.
  • EnvironmentView: conditional rendering by hosting environment through Include and Exclude, case-insensitive.
  • Validation: static SSR forms get client-side validation without a server round trip (on by default with DataAnnotationsValidator), and forms support async validators (AsyncValidationAttribute, IAsyncValidatableObject, IsValidationPending).
  • MathML elements are created with the correct namespace during interactive rendering.
  • Analyzer BL0010 recommends InvokeVoidAsync over InvokeAsync<object> for JavaScript functions that return nothing.
  • IComponentPropertyActivator customizes how [Inject] properties are populated, with keyed-service, Hot Reload and trimming support.

Blazor: state, session and caching

  • TempData in static SSR, ideal for flash messages and the POST-Redirect-GET pattern, with [SupplyParameterFromTempData].
  • Session in static SSR via AddSession/UseSession and [SupplyParameterFromSession]; unlike TempData, values are not cleared after reading. The session cookie is now issued before streaming starts.
  • CacheView caches the rendered markup of a component subtree during static SSR (for example with VaryByQuery and ExpiresAfter) and replays it without instantiating the child components.
  • Server culture: client-side prerendering preserves the server's culture; opt out with WebAssemblyComponentsOptions.UseCultureFromServer = false.
  • Antiforgery: app.UseAntiforgery() is now optional in Blazor Web Apps because CSRF protection is on by default; the call no longer appears in the template.

Blazor: Virtualize, QuickGrid and circuits

  • Virtualize no longer assumes equal item heights and adapts to measured sizes; OverscanCount changes from 3 to 15. The new AnchorMode (None, Start, End) controls behavior at the list edges, while InitialItemIndex and ScrollToItemAsync open and scroll the list to a specific item. It is also compatible with strict CSP because it no longer writes inline styles.
  • QuickGrid: pagination and sorting can live in the query string (?page=2&sort=Name&direction=asc), giving shareable links and working in static SSR without JavaScript; QueryParameterNameOptions renames the parameters and tells several grids on one page apart. It adds OnRowClick and exposes InitialItemIndex, ScrollToItemAsync, AnchorMode and ItemComparer (the last two experimental, ASP0030). Renaming a column Title breaks previously saved URLs.
  • Circuits: Circuit.RequestCircuitPauseAsync lets the server ask for a graceful pause (deployments, instance draining); the opt-in Microsoft.AspNetCore.Components.Server.AutoPause package pauses a circuit when the tab stays hidden; after an authentication refresh the circuit receives the new ClaimsPrincipal without reconnecting.
  • ConfigureConnection on ServerComponentsEndpointOptions configures the SignalR connection options; WithBrowserOptions and ConfigureBrowser configure client startup from server-side C#.

Blazor WebAssembly, templates and AI

  • IHostedService and environment variables in IConfiguration; component metrics and tracing when the runtime has metrics support enabled.
  • Gateway: Microsoft.AspNetCore.Components.Gateway replaces the DevServer for standalone WebAssembly apps and makes the inspectUri property unnecessary.
  • Smaller output: OTEL and Hot Reload code is trimmed away in apps that do not use them.
  • Templates: blazorwebworker (renamed, with InvokeVoidAsync, cancellation and timeout), blazor-wasm-servicedefaults for Aspire, container support in the Blazor Web App template, the mcpserver template bundled in the SDK, and a NavMenu without inline JavaScript.
  • Experimental AI components (Microsoft.AspNetCore.Components.AI): streaming chat, content blocks (RichContentBlock, FunctionApprovalBlock and others) and human approval of tool actions.
  • The release notes list no Blazor Hybrid changes yet.

SignalR and gRPC

SignalR connections can refresh authentication without dropping when the token expires: the server exposes a /refresh endpoint and you enable it per hub with EnableAuthenticationRefresh; the .NET and TypeScript clients refresh automatically and offer RefreshAuthenticationAsync. The client can also cancel regular, non-streaming hub invocations by passing a CancellationToken to InvokeAsync. On gRPC, the Microsoft.AspNetCore.Grpc.Swagger package is deprecated.

Minimal APIs, validation and C# unions

  • Endpoint filters run even when parameter binding fails; in Development, set RouteHandlerOptions.ThrowOnBadRequest = false.
  • The [ShortCircuit] attribute runs an endpoint right after routing, including on MVC controllers.
  • End-to-end async validation in minimal APIs and built-in localization for Microsoft.Extensions.Validation (AddLocalization plus AddValidation); ValidatableTypeAttribute and SkipValidationAttribute are no longer experimental.
  • C# union types are supported wherever System.Text.Json is used; in OpenAPI they are described with anyOf.

OpenAPI

OpenAPI generation describes binary responses (FileContentResult as type: string, format: binary, and likewise the file-stream results), recognizes the HTTP QUERY method, allows several Produces calls for the same status code, maps [Obsolete] to deprecated: true and follows ASP.NET Core behavior more closely for enums and arrays. Generated documents now target OpenAPI 3.2 by default (adjustable with OpenApiVersion), with itemSchema for Server-Sent Events. The OpenApiGenerationEnvironment MSBuild property selects the environment used for build-time generation.

Authentication and authorization

  • ASP.NET Core Identity uses TimeProvider, making expirations and lockouts testable.
  • Passkey names are inferred from the authenticator's AAGUID (Google Password Manager, iCloud Keychain, Windows Hello, 1Password, Bitwarden).
  • dotnet user-jwts create --file app.cs works with file-based apps.
  • IAuthorizationRequirementData attributes now apply to SignalR hubs, MVC controllers and AuthorizeView/AuthorizeRouteView as well, with AuthorizationPolicy.CombineAsync as the shared implementation.
  • Negotiate on Kestrel uses TLS channel binding; the token is also readable through ITlsConnectionFeature.TryGetChannelBindingBytes, and on HTTP.sys HttpAuthenticationHardeningLevel controls extended protection.
  • Experimental support for Device Bound Session Credentials (package Microsoft.AspNetCore.Authentication.DeviceBoundSessions, prerelease throughout .NET 11).

Kestrel, performance and observability

  • The HTTP/1.1 parser no longer throws for malformed requests; the notes cite a 20-40% throughput improvement in scenarios with lots of malformed traffic. HTTP/3 starts processing requests without waiting for the control stream.
  • RequestHeadersTimeout now covers fragmented HTTP/2 and HTTP/3 trailer headers.
  • New TLS diagnostics: ITlsHandshakeFeature.Exception and ListenOptions.UseTlsClientHelloListener (the old callback is obsolete).
  • Zstandard compression for responses and requests, on by default; Vary: Accept-Encoding is always emitted.
  • Native OpenTelemetry tracing: subscribe to the Microsoft.AspNetCore source, no instrumentation library needed.
  • Shared-framework libraries are built with runtime-async; FixedWindowRateLimiter reports an accurate Retry-After; pooling reduces allocations in the HTTP logging middleware.
  • The new IOutputCachePolicyProvider interface, and automatic trust of development certificates in WSL with dotnet dev-certs https --trust.

Before upgrading, check the .NET breaking-changes articles: a few items, such as QuickGrid query parameter names and the obsolete TLS callback, need small adjustments.

Sources

Comments (0)

No comments yet.

Leave a comment