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
RelativeToCurrentUriparameter (defaultfalse) onNavigateToandNavLinkresolves URIs against the current page path. - GetUriWithFragment: a
NavigationManagerextension that builds URIs with hash fragments without allocations. - EnvironmentView: conditional rendering by hosting environment through
IncludeandExclude, 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
InvokeVoidAsyncoverInvokeAsync<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/UseSessionand[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
VaryByQueryandExpiresAfter) 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;
OverscanCountchanges from 3 to 15. The newAnchorMode(None,Start,End) controls behavior at the list edges, whileInitialItemIndexandScrollToItemAsyncopen 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;QueryParameterNameOptionsrenames the parameters and tells several grids on one page apart. It addsOnRowClickand exposesInitialItemIndex,ScrollToItemAsync,AnchorModeandItemComparer(the last two experimental, ASP0030). Renaming a columnTitlebreaks previously saved URLs. - Circuits:
Circuit.RequestCircuitPauseAsynclets the server ask for a graceful pause (deployments, instance draining); the opt-inMicrosoft.AspNetCore.Components.Server.AutoPausepackage pauses a circuit when the tab stays hidden; after an authentication refresh the circuit receives the newClaimsPrincipalwithout reconnecting. - ConfigureConnection on
ServerComponentsEndpointOptionsconfigures the SignalR connection options;WithBrowserOptionsandConfigureBrowserconfigure 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.Gatewayreplaces the DevServer for standalone WebAssembly apps and makes theinspectUriproperty unnecessary. - Smaller output: OTEL and Hot Reload code is trimmed away in apps that do not use them.
- Templates:
blazorwebworker(renamed, withInvokeVoidAsync, cancellation and timeout),blazor-wasm-servicedefaultsfor Aspire, container support in the Blazor Web App template, themcpservertemplate bundled in the SDK, and a NavMenu without inline JavaScript. - Experimental AI components (
Microsoft.AspNetCore.Components.AI): streaming chat, content blocks (RichContentBlock,FunctionApprovalBlockand 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(AddLocalizationplusAddValidation);ValidatableTypeAttributeandSkipValidationAttributeare 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.csworks with file-based apps.IAuthorizationRequirementDataattributes now apply to SignalR hubs, MVC controllers andAuthorizeView/AuthorizeRouteViewas well, withAuthorizationPolicy.CombineAsyncas the shared implementation.- Negotiate on Kestrel uses TLS channel binding; the token is also readable through
ITlsConnectionFeature.TryGetChannelBindingBytes, and on HTTP.sysHttpAuthenticationHardeningLevelcontrols 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.
RequestHeadersTimeoutnow covers fragmented HTTP/2 and HTTP/3 trailer headers.- New TLS diagnostics:
ITlsHandshakeFeature.ExceptionandListenOptions.UseTlsClientHelloListener(the old callback is obsolete). - Zstandard compression for responses and requests, on by default;
Vary: Accept-Encodingis always emitted. - Native OpenTelemetry tracing: subscribe to the
Microsoft.AspNetCoresource, no instrumentation library needed. - Shared-framework libraries are built with runtime-async;
FixedWindowRateLimiterreports an accurateRetry-After; pooling reduces allocations in the HTTP logging middleware. - The new
IOutputCachePolicyProviderinterface, and automatic trust of development certificates in WSL withdotnet 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.