Web Development

Everything you want to know about ASP.NET Core updates in .NET 6 Version

Microsoft released .NET 6 Preview 6., the second to last preview just before the RC period. There will be two RCs. This release itself is relatively small, while Preview 7 will be bigger. There will be quality fixes till the final release in November. Dubbed by Microsoft, as a “small” release, there are still several updates to ASP.NET Core and its Blazor component for coding web apps in C#.

What’s New in ASP.NET Core 6.0

  • Improved Blazor accessibility
  • Required Blazor component parameters
  • Efficient byte array transfers for JavaScript interop
  • Optional parameters for view component tag helpers
  • Angular template updated to Angular 12
  • OpenAPI support for minimal APIs
  • Inject services into minimal APIs without [FromServices] attribute
  • Configure the accept socket for Kestrel
  • IHttpActivityFeature
  • Long-running activity tag for SignalR connections
  • WebSocket compression
  • SignalR WebSockets TestServer support
  • New OnCheckSlidingExpiration event for controlling cookie renewal
  • ClientCertificateMode.DelayCertificate

How to get started?

We will run you through steps if you are looking to get started with ASP.NET Core in .NET 6 Preview 6.

  • Install the .NET 6 SDK
  • Install latest preview of Visual Studio 2022 (if using Windows)
  • Install the most recent preview of Visual Studio 2019 for Mac 8.10. (if using macOS)

Get set up with .NET MAUI & Blazor for cross-platform native apps, see the latest instructions in the .NET MAUI getting started guide.

Now that you are looking to install the latest .NET WebAssembly tools for ahead-of-time (AOT) compilation and runtime relinking, it is important to run the following command from an elevated command prompt:

Upgrade an existing project

If you are looking to upgrade an existing ASP.NET Core app from Preview version 5 to .NET 6 Preview 6:

  • Update all Microsoft.AspNetCore.* package references to 6.0.0-preview.6.*.
  • Update all Microsoft.Extensions.* package references to 6.0.0-preview.6.*.

And if you want to upgrade a .NET MAUI Blazor application from Preview form 5 to .NET Preview 6, so you can start from beginner following steps of the setup of NET MAUI Blazor venture to create SDK and do duplicate code over from your extraordinary task.

Blazor Accessibility

With the aim to improve accessibility, there are several changes when using a screen reader.

  • New role=”alert” attributes for messages during the navigation of a page and removal of role=”alert” from the survey prompt component to reduce the emphasis on its content.
  • Updated the Counter component to include role=”status” as a result the current count is read as the counter gets updated.
  • Semantic markup elements for appropriate like main and article.
  • Interchanged the ul in the NavBar component for a nav for identification of semantics to directly use common screen reader keyboard shortcuts.
  • Added a title to the NavBar toggle button for its purpose to be announced.

ASP.NET Core updates in .NET 6 Preview 6 include:

  • Optional parameters for view component tag helpers: Get support for optional parameters.
  • Angular template updated to Angular 12: “The ASP.NET Core template uses Angular 12.”
  • OpenAPI support for minimal APIs: With minimal APIs, you can now easily set up Swagger UI to visualize and interact with minimal APIs.
  • Inject services into minimal APIs without [FromServices] attribute: Inject services to routing handlers without the [FromServices] attribute.
  • IHttpActivityFeature: Hosting creates an Activity based on every request when there are diagnostic listeners available to allow middleware to access this activity. As such, additional information can be included during request processing.
  • Long-running activity tag for SignalR connections: “SignalR uses the new IHttpActivityFeature to add an ‘http.long_running’ tag to the request activity. For APM services like Azure Monitor Application Insights, it is easy to filter SignalR requests from creating long-running request alerts.”
  • SignalR WebSockets TestServer support: Allow testing with the WebSocket transport.”
  • New OnCheckSlidingExpiration event for controlling cookie renewal: Customise or suppress Cookie authentication using the new OnCheckSlidingExpiration.
  • ClientCertificateMode.DelayCertificate: Developers can now utilize opt-in to for delayed client certificate negotiation by providing ClientCertificateMode.DelayCertificate on the HttpsConnectionAdapterOptions. This will function with HTTP/1.1 connections since HTTP/2 strictly forbids delayed certificate renegotiation.

Tips from Experts in Joomla Website Development

Finally

The release is quickly coming together. It is important to partner with an ASP.NET development company to hire ASP.NET developers to ensure high speed and optimum performance of your web application.

Jane Brewer

Technology consultant in leading web and mobile application development company committed to providing end-to-end IT services in Web, Mobile & Cloud.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button