Middleware in Minimal API: Add links (#31857)
parent
2f56d2d0d0
commit
2fbb27b521
|
@ -1,6 +1,6 @@
|
|||
:::moniker range="= aspnetcore-7.0"
|
||||
|
||||
`WebApplication` automatically adds the following middleware depending on certain conditions:
|
||||
[`WebApplication`](xref:fundamentals/minimal-apis/webapplication) automatically adds the following middleware in [`Minimal API applications`](xref:fundamentals/minimal-apis/overview) depending on certain conditions:
|
||||
* [`UseDeveloperExceptionPage`](/dotnet/api/microsoft.aspnetcore.diagnostics.developerexceptionpagemiddleware) is added first when the [`HostingEnvironment`](xref:fundamentals/environments) is `"Development"`.
|
||||
* [`UseRouting`](/dotnet/api/microsoft.aspnetcore.builder.endpointroutingapplicationbuilderextensions.userouting) is added second if user code didn't already call `UseRouting` and if there are endpoints configured, for example `app.MapGet`.
|
||||
* [`UseEndpoints`](/dotnet/api/microsoft.aspnetcore.builder.endpointroutingapplicationbuilderextensions.useendpoints) is added at the end of the middleware pipeline if any endpoints are configured.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
:::moniker range=">= aspnetcore-8.0"
|
||||
|
||||
`WebApplication` automatically adds the following middleware depending on certain conditions:
|
||||
[`WebApplication`](xref:fundamentals/minimal-apis/webapplication) automatically adds the following middleware in [`Minimal API applications`](xref:fundamentals/minimal-apis/overview) depending on certain conditions:
|
||||
* [`UseDeveloperExceptionPage`](/dotnet/api/microsoft.aspnetcore.diagnostics.developerexceptionpagemiddleware) is added first when the [`HostingEnvironment`](xref:fundamentals/environments) is `"Development"`.
|
||||
* [`UseRouting`](/dotnet/api/microsoft.aspnetcore.builder.endpointroutingapplicationbuilderextensions.userouting) is added second if user code didn't already call `UseRouting` and if there are endpoints configured, for example `app.MapGet`.
|
||||
* [`UseEndpoints`](/dotnet/api/microsoft.aspnetcore.builder.endpointroutingapplicationbuilderextensions.useendpoints) is added at the end of the middleware pipeline if any endpoints are configured.
|
||||
|
|
|
@ -3,7 +3,7 @@ title: Middleware with Minimal API applications
|
|||
author: BrennanConroy
|
||||
description: Use middleware in Minimal API applications
|
||||
ms.author: brecon
|
||||
ms.date: 8/25/2023
|
||||
ms.date: 02/16/2024
|
||||
monikerRange: '>= aspnetcore-7.0'
|
||||
uid: fundamentals/minimal-apis/middleware
|
||||
---
|
||||
|
@ -14,3 +14,5 @@ uid: fundamentals/minimal-apis/middleware
|
|||
[!INCLUDE [webapplication8](~/fundamentals/minimal-apis/includes/middleware8.md)]
|
||||
|
||||
For more information about middleware see [ASP.NET Core Middleware](xref:fundamentals/middleware/index), and the [list of built-in middleware](xref:fundamentals/middleware/index#built-in-middleware) that can be added to applications.
|
||||
|
||||
For more information about Minimal APIs see [`Minimal APIs overview`](xref:fundamentals/minimal-apis/overview).
|
||||
|
|
Loading…
Reference in New Issue