-
Notifications
You must be signed in to change notification settings - Fork 25.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document what's new in ASP.NET Core for .NET 9 Preview 4 #32361
Comments
Developer exception page improvementsThe ASP.NET Core developer exception page is displayed when an app throws an unhandled exception during development. The developer exception page provides detailed information about the exception and request. It's a feature you hate to see but are glad it's there. Last preview introduced endpoint metadata. While testing the developer exception page, small quality of life improvements were identified. They ship in preview 4:
Thank you @ElderJames for this contribution. |
New
|
If the |
@mgravell This issue is tracking the content for the release notes, which includes the aggregated What's New doc and the per-release notes in the dotnet/core repo. The release notes typically capture what the feature is and why it's important and then link to official documentation for all the details. You can, of course, publish related blog post content as well, but official docs and release notes typically shouldn't reference blog posts, because blog posts are generally point-in-time content. Please feel free to edit the above content as appropriate for what you actually want to be in the release notes. Any additional details can go into a separate issue for adding reference docs about the feature that get linked to from the release notes. |
Ability to add static SSR pages to a globally-interactive Blazor Web applicationSince .NET 8, the Blazor Web application template includes an option to enable global interactivity, which means that all pages run on either Server or WebAssembly interactivity modes (or Auto, which combines both). It was not possible to add static SSR pages to those sites, since global interactivity meant that all pages would be interactive. Many developers requested a way to have static SSR pages on an otherwise globally-interactive site. This was almost possible already, except for a limitation that when the interactive Server/WebAssembly router was active, there was no way to escape from it back into a static SSR context. As of .NET 9 Preview 4 this is now possible. You can mark any Blazor page component with the new @page "/weather"
@attribute [ExcludeFromInteractiveRouting]
<h1>The rest of the page</h1> This causes navigations to the page to exit from interactive routing. That is, inbound navigations will be forced to perform a full-page reload instead of being resolved via SPA-style interactive routing. This means that your top-level <!DOCTYPE html>
<html>
<head>
... other head content here ...
<HeadOutlet @rendermode="@PageRenderMode" />
</head>
<body>
<Routes @rendermode="@PageRenderMode" />
<script src="_framework/blazor.web.js"></script>
</body>
</html>
@code {
[CascadingParameter]
private HttpContext HttpContext { get; set; } = default!;
private IComponentRenderMode? PageRenderMode
=> HttpContext.AcceptsInteractiveRouting() ? InteractiveServer : null;
} When set up like this, all pages will default to The new When to consider doing thisThis is useful only if you have certain pages that can't work with interactive Server or WebAssembly rendering. For example, those pages might include code that depends on reading/writing HTTP cookies, and hence can only work in a request/response cycle. Forcing those pages to use static SSR mode will force them into this traditional request/response cycle instead of interactive SPA-style rendering. For pages that do work with interactive SPA-style rendering, you should not force them to use static SSR rendering only as it would simply be less efficient and less responsive for the end user. |
Introducing built-in support for OpenAPI document generationThe OpenAPI specification is a standard for describing HTTP APIs. The standard allows developers to define the shape of APIs that can be plugged into client generators, server generators, testing tools, documentation and more. As of .NET 9 Preview 4, ASP.NET Core provides built-in support for generating OpenAPI documents representing the underlying controller-based or minimal API via the To take advantage of this feature, install the
In your application's
var builder = WebApplication.CreateBuilder();
builder.Services.AddOpenApi();
var app = builder.Build();
app.MapOpenApi();
app.MapGet("/hello/{name}", (string name) => $"Hello {name}"!);
app.Run(); Run your application and navigate to You can also generated OpenAPI documents at build-time using the
In your application's project file, add the following: <PropertyGroup>
<OpenApiDocumentsDirectory>$(MSBuildProjectDirectory)</OpenApiDocumentsDirectory>
<OpenApiGenerateDocuments>true</OpenApiGenerateDocuments>
</PropertyGroup> Then, run ASP.NET Core's built-in OpenAPI document generation provides support for various customizations and options, including document and operation transformers and the ability to manage multiple OpenAPI documents for the same application. To learn more about the available APIs, read the news docs on OpenAPI. To learn more about upcoming features in this space, follow the tracking issue. |
Note: Fix is in the globally installed ANCM module which comes from the hosting bundle. Fix for 503's during app recycle in IIS. By default there is now a 1 second delay between when IIS is notified of a recycle/shutdown and when ANCM will tell the managed server to start shutting down. The delay is configurable via the Example of setting
|
@tdykstra Is this issue ok to close? Or are there still pending items? |
No pending items. |
Description
Update the "What's new in ASP.NET Core 9.0" for .NET 9 Preview 4
@adityamandaleeka @mkArtakMSFT Please have folks comment on this issue with the desired content.
FYI: @samsp-msft @JeremyLikness @mikekistler @claudiaregio @JamesNK @SteveSandersonMS @davidfowl
Page URL
https://learn.microsoft.com/aspnet/core/release-notes/aspnetcore-9.0
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/release-notes/aspnetcore-9.0.md
Document ID
4e75ad25-2c3f-b28e-6a91-ac79a9c683b6
Article author
@Rick-Anderson @tdykstra @guardrex
Associated WorkItem - 246761
The text was updated successfully, but these errors were encountered: