Improvements to HttpLoggingMiddleware in ASP.NET 8

Table of Contents Intro New Config HttpLoggingInterceptor More References Intro .NET 6 began to introduce an http logging middleware. We can use the http logging middleware to record request and response information, but the scalability is not very strong. In the .NET 8 version, some optimizations were made and some New configuration and HttpLoggingInterceptor make […]

Improvements to HttpLoggingMiddleware in ASP.NET 8

Improvements in HttpLoggingMiddleware in ASP.NET 8 Intro .NET 6 began to introduce an http logging middleware. We can use the http logging middleware to record request and response information, but the scalability is not very strong. In the .NET 8 version, some optimizations were made and some New configuration and HttpLoggingInterceptor make it easier to […]

ASP.NET Core policy authorization and ABP authorization

Policy authorization in ASP.NET Core First let’s create a WebAPI application. Then introduce the Microsoft.AspNetCore.Authentication.JwtBearer package. Strategy In the ConfigureServices method of the Startup class, the form of adding a policy is as follows: services.AddAuthorization(options => { options.AddPolicy(“AtLeast21”, policy => policy.Requirements.Add(new MinimumAgeRequirement(21))); }); Here we go step by step. services.AddAuthorization is used to add authorization […]

ASP.NET Core Model Binding – Advanced

In this section, we use examples to explain the advanced concepts of model binding. We explain them from these dimensions: 1 Model binding array type 2 Model binding collection type 3 Model binding complex collection types 4 Model binding sources 1 Model binding array type Using model binding we can bind array type parameters to […]

Use of Identity framework in ASP.NET Core

Identity framework: 1. Adopt the Role-Based Access Control (RABC) strategy, which has built-in management of user, role and other tables and related interfaces. 2. The Identity framework uses EF Core to operate the database. Identity framework usage Since the Identity framework uses EF Core to operate the database, the operation has similar expenditures as defining […]

ASP.NET Core Filter Advanced

In this section we discuss advanced topics of filters – filter dependencies, global filters, filter execution order & changing the filter order. In the previous section we introduced the basic use of filters in ASP.NET Core 1 ASP.NET Core filter dependency injection If a filter has a dependency, it cannot be applied to the action […]

ASP.NET Core updates in .NET 8 Preview 1

Table of Contents Full stack web UI using Blazor Improved authentication and authorization experience Native AOT ASP.NET Core Roadmap for .NET 8 What’s new in .NET 8 Preview 1? start Upgrade an existing project routing tools Routing constraint performance improvements New analyzer for API development It is recommended to set or append to the title […]