From 9ab399f7c6ca551ca3af7e571194dc0f5b41da93 Mon Sep 17 00:00:00 2001 From: guardrex <1622880+guardrex@users.noreply.github.com> Date: Wed, 11 Feb 2026 07:37:44 -0500 Subject: [PATCH 1/3] Purge "(s)" from repo articles --- ...ft-entra-id-groups-and-roles-net-5-to-7.md | 2 +- aspnetcore/data/entity-framework-6.md | 2 +- .../includes/select-language-culture5.md | 2 +- .../includes/select-language-culture67.md | 2 +- .../localization/select-language-culture.md | 2 +- .../openapi/aspnetcore-openapi.md | 2 +- .../fundamentals/openapi/include-metadata.md | 30 +++++++++---------- .../openapi/includes/aspnetcore-openapi9.md | 2 +- .../openapi/includes/include-metadata10.md | 30 +++++++++---------- .../openapi/includes/include-metadata9.md | 30 +++++++++---------- .../kestrel/when-to-use-a-reverse-proxy.md | 2 +- .../servers/yarp/extensibility.md | 2 +- .../servers/yarp/header-routing.md | 2 +- .../fundamentals/servers/yarp/https-tls.md | 2 +- .../servers/yarp/queryparameter-routing.md | 2 +- aspnetcore/mvc/controllers/filters.md | 2 +- .../controllers/filters/includes/filters7.md | 4 +-- aspnetcore/razor-pages/filter.md | 4 +-- aspnetcore/security/authentication/index.md | 6 ++-- aspnetcore/signalr/background-services.md | 2 +- 20 files changed, 66 insertions(+), 66 deletions(-) diff --git a/aspnetcore/blazor/security/webassembly/microsoft-entra-id-groups-and-roles-net-5-to-7.md b/aspnetcore/blazor/security/webassembly/microsoft-entra-id-groups-and-roles-net-5-to-7.md index b5ecbf57f36e..d725db0b730d 100644 --- a/aspnetcore/blazor/security/webassembly/microsoft-entra-id-groups-and-roles-net-5-to-7.md +++ b/aspnetcore/blazor/security/webassembly/microsoft-entra-id-groups-and-roles-net-5-to-7.md @@ -613,7 +613,7 @@ builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) > [!NOTE] > If you prefer to use the `wids` claim (ADD Administrator Roles), assign "`wids`" to the . -After you've completed the preceding steps to create and assign roles to users (or groups if you have a Premium tier Azure account) and implemented the `CustomAccountFactory` with the Graph SDK, as explained earlier in this article and in , you should see an `appRole` claim for each assigned role that a signed-in user is assigned (or roles assigned to groups that they are members of). Run the app with a test user to confirm the claim(s) are present as expected. When testing with the Graph SDK locally, we recommend using a new in-private/incognito browser session for each test to prevent lingering cookies from interfering with tests. For more information, see . +After you've completed the preceding steps to create and assign roles to users (or groups if you have a Premium tier Azure account) and implemented the `CustomAccountFactory` with the Graph SDK, as explained earlier in this article and in , you should see an `appRole` claim for each assigned role that a signed-in user is assigned (or roles assigned to groups that they are members of). Run the app with a test user to confirm the claims are present as expected. When testing with the Graph SDK locally, we recommend using a new in-private/incognito browser session for each test to prevent lingering cookies from interfering with tests. For more information, see . Component authorization approaches are functional at this point. Any of the authorization mechanisms in components of the **CLIENT** app can use the `Admin` role to authorize the user: diff --git a/aspnetcore/data/entity-framework-6.md b/aspnetcore/data/entity-framework-6.md index 9452de3686c9..455af4c21750 100644 --- a/aspnetcore/data/entity-framework-6.md +++ b/aspnetcore/data/entity-framework-6.md @@ -96,6 +96,6 @@ This sample can be created from scratch by the following steps in Visual Studio: * In the Core project, in `appsettings.json`, add the connection string. -* In the Core project, add a controller and view(s) to verify that you can read and write data. (Note that ASP.NET Core MVC scaffolding won't work with the EF6 context referenced from the class library.) +* In the Core project, add a controller and views to verify that you can read and write data. (Note that ASP.NET Core MVC scaffolding won't work with the EF6 context referenced from the class library.) :::moniker-end diff --git a/aspnetcore/fundamentals/localization/includes/select-language-culture5.md b/aspnetcore/fundamentals/localization/includes/select-language-culture5.md index f021d8b08b5a..1f32204aafbe 100644 --- a/aspnetcore/fundamentals/localization/includes/select-language-culture5.md +++ b/aspnetcore/fundamentals/localization/includes/select-language-culture5.md @@ -64,7 +64,7 @@ The [Accept-Language header](https://www.w3.org/International/questions/qa-accep The [Content-Language](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Language) entity header: -* Is used to describe the language(s) intended for the audience. +* Is used to describe the languages intended for the audience. * Allows a user to differentiate according to the users' own preferred language. Entity headers are used in both HTTP requests and responses. diff --git a/aspnetcore/fundamentals/localization/includes/select-language-culture67.md b/aspnetcore/fundamentals/localization/includes/select-language-culture67.md index 07cb610f7e1a..b5eb1bea4726 100644 --- a/aspnetcore/fundamentals/localization/includes/select-language-culture67.md +++ b/aspnetcore/fundamentals/localization/includes/select-language-culture67.md @@ -65,7 +65,7 @@ The [Accept-Language header](https://www.w3.org/International/questions/qa-accep The [Content-Language](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Language) entity header: -* Is used to describe the language(s) intended for the audience. +* Is used to describe the languages intended for the audience. * Allows a user to differentiate according to the users' own preferred language. Entity headers are used in both HTTP requests and responses. diff --git a/aspnetcore/fundamentals/localization/select-language-culture.md b/aspnetcore/fundamentals/localization/select-language-culture.md index e76d53158192..08492e8a01b4 100644 --- a/aspnetcore/fundamentals/localization/select-language-culture.md +++ b/aspnetcore/fundamentals/localization/select-language-culture.md @@ -77,7 +77,7 @@ The [Accept-Language header](https://www.w3.org/International/questions/qa-accep The [Content-Language](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Language) entity header: -* Is used to describe the language(s) intended for the audience. +* Is used to describe the languages intended for the audience. * Allows a user to differentiate according to the users' own preferred language. Entity headers are used in both HTTP requests and responses. diff --git a/aspnetcore/fundamentals/openapi/aspnetcore-openapi.md b/aspnetcore/fundamentals/openapi/aspnetcore-openapi.md index 406e9175b49f..26e85d9ed0bc 100644 --- a/aspnetcore/fundamentals/openapi/aspnetcore-openapi.md +++ b/aspnetcore/fundamentals/openapi/aspnetcore-openapi.md @@ -219,7 +219,7 @@ dotnet add package Microsoft.Extensions.ApiDescription.Server Upon installation, this package: -* Automatically generates the Open API document(s) associated with the app during build. +* Automatically generates the Open API documents associated with the app during build. * Populates the Open API documents in the app's output directory. If multiple documents are registered ***and*** the document name is ***not*** `v1`, the project name is post-fixed with the document name. Example: `{ProjectName}_{DocumentName}.json`. The `{ProjectName}` placeholder is the project name, and the `{DocumentName}` placeholder is the document name. diff --git a/aspnetcore/fundamentals/openapi/include-metadata.md b/aspnetcore/fundamentals/openapi/include-metadata.md index 404d8f142eb8..bb45d4ece5ae 100644 --- a/aspnetcore/fundamentals/openapi/include-metadata.md +++ b/aspnetcore/fundamentals/openapi/include-metadata.md @@ -186,7 +186,7 @@ public IResult Attributes( ### Describe the request body -The `requestBody` field in OpenAPI describes the body of a request that an API client can send to the server, including the content type(s) supported and the schema for the body content. +The `requestBody` field in OpenAPI describes the body of a request that an API client can send to the server, including the content types supported and the schema for the body content. When the endpoint handler method accepts parameters that are bound from the request body, ASP.NET Core generates a corresponding `requestBody` for the operation in the OpenAPI document. Metadata for the request body can also be specified using attributes or extension methods. Additional metadata can be set with a [document transformer](xref:fundamentals/openapi/customize-openapi#use-document-transformers) or [operation transformer](xref:fundamentals/openapi/customize-openapi#use-operation-transformers). @@ -206,14 +206,14 @@ Other mechanisms for setting request body metadata depend on the type of app bei #### [Minimal APIs](#tab/minimal-apis) The content types for the request body in the generated OpenAPI document are determined from the type of the parameter that is bound to the request body or specified with the extension method. -By default, the content type of a [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) parameter will be `application/json` and the content type for [`FromForm`](xref:Microsoft.AspNetCore.Mvc.FromFormAttribute) parameter(s) will be `multipart/form-data` or `application/x-www-form-urlencoded`. +By default, the content type of a [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) parameter is `application/json` and the content type for [`FromForm`](xref:Microsoft.AspNetCore.Mvc.FromFormAttribute) parameters is `multipart/form-data` or `application/x-www-form-urlencoded`. Support for these default content types is built in to Minimal APIs, and other content types can be handled by using custom binding. See the [Custom binding](xref:fundamentals/minimal-apis/parameter-binding#custom-binding) topic of the Minimal APIs documentation for more information. There are several ways to specify a different content type for the request body. -If the type of the [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) parameter implements , ASP.NET Core uses this interface to determine the content type(s) in the request body. -The framework uses the method of this interface to set the content type(s) and type of the body content of the request body. For example, a `Todo` class that accepts either `application/xml` or `text/xml` content-type can use to provide this information to the framework. +If the type of the [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) parameter implements , ASP.NET Core uses this interface to determine the content types in the request body. +The framework uses the method of this interface to set the content types and type of the body content of the request body. For example, a `Todo` class that accepts either `application/xml` or `text/xml` content-type can use to provide this information to the framework. ```csharp public class Todo : IEndpointParameterMetadataProvider @@ -262,20 +262,20 @@ If you specify types configured in the application, or by a [`[Consumes]`](xref:Microsoft.AspNetCore.Mvc.ConsumesAttribute) attribute on the route handler method. +In controller-based apps, the content types for the request body in the generated OpenAPI document are determined from the type of the parameter that is bound to the request body, the types configured in the application, or by a [`[Consumes]`](xref:Microsoft.AspNetCore.Mvc.ConsumesAttribute) attribute on the route handler method. ASP.NET Core uses an to deserialize a [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) request body. InputFormatters are configured in the passed to the extension method for the app's service collection. -Each input formatter declares the content types it can handle, in its property, and the type(s) of body content it can handle, with its method. +Each input formatter declares the content types it can handle, in its property, and the types of body content it can handle, with its method. ASP.NET Core MVC includes built-in input formatters for JSON and XML, though only the JSON input formatter is enabled by default. The built-in JSON input formatter supports the `application/json`, `text/json`, and `application/*+json` content types, and the built-in XML input formatter supports the `application/xml`, `text/xml`, and `application/*+xml` content types. -By default, the content type of a [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) request body may be any content type accepted by an for the [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) parameter type. For a request body with [`FromForm`](xref:Microsoft.AspNetCore.Mvc.FromFormAttribute) parameter(s) the default content types are `multipart/form-data` or `application/x-www-form-urlencoded`.These content types will be included in the generated OpenAPI document if the [`[Consumes]`](xref:Microsoft.AspNetCore.Mvc.ConsumesAttribute) attribute is not specified on the route handler method. +By default, the content type of a [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) request body may be any content type accepted by an for the [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) parameter type. For a request body with [`FromForm`](xref:Microsoft.AspNetCore.Mvc.FromFormAttribute) parameters the default content types are `multipart/form-data` or `application/x-www-form-urlencoded`.These content types will be included in the generated OpenAPI document if the [`[Consumes]`](xref:Microsoft.AspNetCore.Mvc.ConsumesAttribute) attribute is not specified on the route handler method. -The content type(s) accepted by a route handler can be restricted using a [filter](xref:mvc/controllers/filters) on the endpoint (action scope). +The content types accepted by a route handler can be restricted using a [filter](xref:mvc/controllers/filters) on the endpoint (action scope). The [`[Consumes]`](xref:Microsoft.AspNetCore.Mvc.ConsumesAttribute) attribute adds an action scope filter to the endpoint that restricts the content types that a route handler will accept. -In this case, the requestBody in the generated OpenAPI document will include only the content type(s) specified in the [`[Consumes]`](xref:Microsoft.AspNetCore.Mvc.ConsumesAttribute) attribute. +In this case, the requestBody in the generated OpenAPI document will include only the content types specified in the [`[Consumes]`](xref:Microsoft.AspNetCore.Mvc.ConsumesAttribute) attribute. A [`[Consumes]`](xref:Microsoft.AspNetCore.Mvc.ConsumesAttribute) attribute can't add support for a content type that doesn't have an associated input formatter, and the generated OpenAPI document doesn't include any content types that don't have an associated input formatter. @@ -288,7 +288,7 @@ If the route handler doesn't have a [`FromBody`](xref:Microsoft.AspNetCore.Mvc.F ### Describe response types -OpenAPI supports providing a description of the responses returned from an API. ASP.NET Core provides several strategies for setting the response metadata of an endpoint. Response metadata that can be set includes the status code, the type of the response body, and content type(s) of a response. Responses in OpenAPI may have additional metadata, such as description, headers, links, and examples. This additional metadata can be set with a [document transformer](xref:fundamentals/openapi/customize-openapi#use-document-transformers) or [operation transformer](xref:fundamentals/openapi/customize-openapi#use-operation-transformers). +OpenAPI supports providing a description of the responses returned from an API. ASP.NET Core provides several strategies for setting the response metadata of an endpoint. Response metadata that can be set includes the status code, the type of the response body, and content types of a response. Responses in OpenAPI may have additional metadata, such as description, headers, links, and examples. This additional metadata can be set with a [document transformer](xref:fundamentals/openapi/customize-openapi#use-document-transformers) or [operation transformer](xref:fundamentals/openapi/customize-openapi#use-operation-transformers). The specific mechanisms for setting response metadata depend on the type of app being developed. @@ -296,10 +296,10 @@ The specific mechanisms for setting response metadata depend on the type of app In Minimal API apps, ASP.NET Core can extract the response metadata added by extension methods on the endpoint, attributes on the route handler, and the return type of the route handler. -* The extension method can be used on the endpoint to specify the status code, the type of the response body, and content type(s) of a response from an endpoint. +* The extension method can be used on the endpoint to specify the status code, the type of the response body, and content types of a response from an endpoint. * The [`[ProducesResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute) or attribute can be used to specify the type of the response body. -* A route handler can be used to return a type that implements to specify the type and content-type(s) of the response body. -* The extension method on the endpoint can be used to specify the status code and content-type(s) of an error response. +* A route handler can be used to return a type that implements to specify the type and content-types of the response body. +* The extension method on the endpoint can be used to specify the status code and content-types of an error response. Note that the and extension methods are supported on both and on . This allows, for example, a common set of error responses to be defined for all operations in a group. @@ -434,10 +434,10 @@ If an endpoint can return different response types in different scenarios, you c In controller-based apps, ASP.NET Core can extract the response metadata from the action method signature, attributes, and conventions. -* You can use the [`[ProducesResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute) or attribute to specify the status code, the type of the response body, and content type(s) of a response from an action method. +* You can use the [`[ProducesResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute) or attribute to specify the status code, the type of the response body, and content types of a response from an action method. * You can use the [`[Produces]`](xref:Microsoft.AspNetCore.Mvc.ProducesAttribute) or attribute to specify the type of the response body. * You can use the [`[ProducesDefaultResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesDefaultResponseTypeAttribute) attribute to specify the response body type for the "default" response. -* You can use the [`[ProducesErrorResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesErrorResponseTypeAttribute) attribute to specify the response body type for an error response. However, be aware that this is only complements the status code and content type(s) specified by an [`[ProducesResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute) attribute with a 4XX status code. +* You can use the [`[ProducesErrorResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesErrorResponseTypeAttribute) attribute to specify the response body type for an error response. However, be aware that this is only complements the status code and content types specified by an [`[ProducesResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute) attribute with a 4XX status code. Only one [`[Produces]`](xref:Microsoft.AspNetCore.Mvc.ProducesAttribute) or attributes may be applied to an action method, but multiple [`[ProducesResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute) or attributes with different status codes may be applied to a single action method. diff --git a/aspnetcore/fundamentals/openapi/includes/aspnetcore-openapi9.md b/aspnetcore/fundamentals/openapi/includes/aspnetcore-openapi9.md index c85061c33abe..94bd3e87c5a4 100644 --- a/aspnetcore/fundamentals/openapi/includes/aspnetcore-openapi9.md +++ b/aspnetcore/fundamentals/openapi/includes/aspnetcore-openapi9.md @@ -169,7 +169,7 @@ dotnet add package Microsoft.Extensions.ApiDescription.Server Upon installation, this package: -* Automatically generates the Open API document(s) associated with the app during build. +* Automatically generates the Open API documents associated with the app during build. * Populates the Open API documents in the app's output directory. If multiple documents are registered, ***and*** document name is ***not*** `v1`, it's post-fixed with the document name. E.g., `{ProjectName}_{DocumentName}.json`. diff --git a/aspnetcore/fundamentals/openapi/includes/include-metadata10.md b/aspnetcore/fundamentals/openapi/includes/include-metadata10.md index 3b3451feed60..8d635a083e8a 100644 --- a/aspnetcore/fundamentals/openapi/includes/include-metadata10.md +++ b/aspnetcore/fundamentals/openapi/includes/include-metadata10.md @@ -171,7 +171,7 @@ public IResult Attributes( ### Describe the request body -The `requestBody` field in OpenAPI describes the body of a request that an API client can send to the server, including the content type(s) supported and the schema for the body content. +The `requestBody` field in OpenAPI describes the body of a request that an API client can send to the server, including the content types supported and the schema for the body content. When the endpoint handler method accepts parameters that are bound from the request body, ASP.NET Core generates a corresponding `requestBody` for the operation in the OpenAPI document. Metadata for the request body can also be specified using attributes or extension methods. Additional metadata can be set with a [document transformer](xref:fundamentals/openapi/customize-openapi#use-document-transformers) or [operation transformer](xref:fundamentals/openapi/customize-openapi#use-operation-transformers). @@ -191,14 +191,14 @@ Other mechanisms for setting request body metadata depend on the type of app bei #### [Minimal APIs](#tab/minimal-apis) The content types for the request body in the generated OpenAPI document are determined from the type of the parameter that is bound to the request body or specified with the extension method. -By default, the content type of a [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) parameter will be `application/json` and the content type for [`FromForm`](xref:Microsoft.AspNetCore.Mvc.FromFormAttribute) parameter(s) will be `multipart/form-data` or `application/x-www-form-urlencoded`. +By default, the content type of a [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) parameter will be `application/json` and the content type for [`FromForm`](xref:Microsoft.AspNetCore.Mvc.FromFormAttribute) parameters is `multipart/form-data` or `application/x-www-form-urlencoded`. Support for these default content types is built in to Minimal APIs, and other content types can be handled by using custom binding. See the [Custom binding](xref:fundamentals/minimal-apis/parameter-binding#custom-binding) topic of the Minimal APIs documentation for more information. There are several ways to specify a different content type for the request body. -If the type of the [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) parameter implements , ASP.NET Core uses this interface to determine the content type(s) in the request body. -The framework uses the method of this interface to set the content type(s) and type of the body content of the request body. For example, a `Todo` class that accepts either `application/xml` or `text/xml` content-type can use to provide this information to the framework. +If the type of the [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) parameter implements , ASP.NET Core uses this interface to determine the content types in the request body. +The framework uses the method of this interface to set the content types and type of the body content of the request body. For example, a `Todo` class that accepts either `application/xml` or `text/xml` content-type can use to provide this information to the framework. ```csharp public class Todo : IEndpointParameterMetadataProvider @@ -247,20 +247,20 @@ If you specify types configured in the application, or by a [`[Consumes]`](xref:Microsoft.AspNetCore.Mvc.ConsumesAttribute) attribute on the route handler method. +In controller-based apps, the content types for the request body in the generated OpenAPI document are determined from the type of the parameter that is bound to the request body, the types configured in the application, or by a [`[Consumes]`](xref:Microsoft.AspNetCore.Mvc.ConsumesAttribute) attribute on the route handler method. ASP.NET Core uses an to deserialize a [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) request body. InputFormatters are configured in the passed to the extension method for the app's service collection. -Each input formatter declares the content types it can handle, in its property, and the type(s) of body content it can handle, with its method. +Each input formatter declares the content types it can handle, in its property, and the types of body content it can handle, with its method. ASP.NET Core MVC includes built-in input formatters for JSON and XML, though only the JSON input formatter is enabled by default. The built-in JSON input formatter supports the `application/json`, `text/json`, and `application/*+json` content types, and the built-in XML input formatter supports the `application/xml`, `text/xml`, and `application/*+xml` content types. -By default, the content type of a [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) request body may be any content type accepted by an for the [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) parameter type. For a request body with [`FromForm`](xref:Microsoft.AspNetCore.Mvc.FromFormAttribute) parameter(s) the default content types are `multipart/form-data` or `application/x-www-form-urlencoded`.These content types will be included in the generated OpenAPI document if the [`[Consumes]`](xref:Microsoft.AspNetCore.Mvc.ConsumesAttribute) attribute is not specified on the route handler method. +By default, the content type of a [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) request body may be any content type accepted by an for the [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) parameter type. For a request body with [`FromForm`](xref:Microsoft.AspNetCore.Mvc.FromFormAttribute) parameters the default content types are `multipart/form-data` or `application/x-www-form-urlencoded`.These content types will be included in the generated OpenAPI document if the [`[Consumes]`](xref:Microsoft.AspNetCore.Mvc.ConsumesAttribute) attribute is not specified on the route handler method. -The content type(s) accepted by a route handler can be restricted using a [filter](xref:mvc/controllers/filters) on the endpoint (action scope). +The content types accepted by a route handler can be restricted using a [filter](xref:mvc/controllers/filters) on the endpoint (action scope). The [`[Consumes]`](xref:Microsoft.AspNetCore.Mvc.ConsumesAttribute) attribute adds an action scope filter to the endpoint that restricts the content types that a route handler will accept. -In this case, the requestBody in the generated OpenAPI document will include only the content type(s) specified in the [`[Consumes]`](xref:Microsoft.AspNetCore.Mvc.ConsumesAttribute) attribute. +In this case, the requestBody in the generated OpenAPI document will include only the content types specified in the [`[Consumes]`](xref:Microsoft.AspNetCore.Mvc.ConsumesAttribute) attribute. A [`[Consumes]`](xref:Microsoft.AspNetCore.Mvc.ConsumesAttribute) attribute can't add support for a content type that doesn't have an associated input formatter, and the generated OpenAPI document doesn't include any content types that don't have an associated input formatter. @@ -273,7 +273,7 @@ If the route handler doesn't have a [`FromBody`](xref:Microsoft.AspNetCore.Mvc.F ### Describe response types -OpenAPI supports providing a description of the responses returned from an API. ASP.NET Core provides several strategies for setting the response metadata of an endpoint. Response metadata that can be set includes the status code, the type of the response body, and content type(s) of a response. Responses in OpenAPI may have additional metadata, such as description, headers, links, and examples. This additional metadata can be set with a [document transformer](xref:fundamentals/openapi/customize-openapi#use-document-transformers) or [operation transformer](xref:fundamentals/openapi/customize-openapi#use-operation-transformers). +OpenAPI supports providing a description of the responses returned from an API. ASP.NET Core provides several strategies for setting the response metadata of an endpoint. Response metadata that can be set includes the status code, the type of the response body, and content types of a response. Responses in OpenAPI may have additional metadata, such as description, headers, links, and examples. This additional metadata can be set with a [document transformer](xref:fundamentals/openapi/customize-openapi#use-document-transformers) or [operation transformer](xref:fundamentals/openapi/customize-openapi#use-operation-transformers). The specific mechanisms for setting response metadata depend on the type of app being developed. @@ -281,10 +281,10 @@ The specific mechanisms for setting response metadata depend on the type of app In Minimal API apps, ASP.NET Core can extract the response metadata added by extension methods on the endpoint, attributes on the route handler, and the return type of the route handler. -* The extension method can be used on the endpoint to specify the status code, the type of the response body, and content type(s) of a response from an endpoint. +* The extension method can be used on the endpoint to specify the status code, the type of the response body, and content types of a response from an endpoint. * The [`[ProducesResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute) or attribute can be used to specify the type of the response body. -* A route handler can be used to return a type that implements to specify the type and content-type(s) of the response body. -* The extension method on the endpoint can be used to specify the status code and content-type(s) of an error response. +* A route handler can be used to return a type that implements to specify the type and content-types of the response body. +* The extension method on the endpoint can be used to specify the status code and content-types of an error response. Note that the and extension methods are supported on both and on . This allows, for example, a common set of error responses to be defined for all operations in a group. @@ -381,10 +381,10 @@ If an endpoint can return different response types in different scenarios, you c In controller-based apps, ASP.NET Core can extract the response metadata from the action method signature, attributes, and conventions. -* You can use the [`[ProducesResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute) or attribute to specify the status code, the type of the response body, and content type(s) of a response from an action method. +* You can use the [`[ProducesResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute) or attribute to specify the status code, the type of the response body, and content types of a response from an action method. * You can use the [`[Produces]`](xref:Microsoft.AspNetCore.Mvc.ProducesAttribute) or attribute to specify the type of the response body. * You can use the [`[ProducesDefaultResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesDefaultResponseTypeAttribute) attribute to specify the response body type for the "default" response. -* You can use the [`[ProducesErrorResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesErrorResponseTypeAttribute) attribute to specify the response body type for an error response. However, be aware that this is only complements the status code and content type(s) specified by an [`[ProducesResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute) attribute with a 4XX status code. +* You can use the [`[ProducesErrorResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesErrorResponseTypeAttribute) attribute to specify the response body type for an error response. However, be aware that this is only complements the status code and content types specified by an [`[ProducesResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute) attribute with a 4XX status code. Only one [`[Produces]`](xref:Microsoft.AspNetCore.Mvc.ProducesAttribute) or attributes may be applied to an action method, but multiple [`[ProducesResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute) or attributes with different status codes may be applied to a single action method. diff --git a/aspnetcore/fundamentals/openapi/includes/include-metadata9.md b/aspnetcore/fundamentals/openapi/includes/include-metadata9.md index 01b4aa42c208..89ac246959f3 100644 --- a/aspnetcore/fundamentals/openapi/includes/include-metadata9.md +++ b/aspnetcore/fundamentals/openapi/includes/include-metadata9.md @@ -170,7 +170,7 @@ public IResult Attributes([Description("This is a description.")] string name) ### Describe the request body -The `requestBody` field in OpenAPI describes the body of a request that an API client can send to the server, including the content type(s) supported and the schema for the body content. +The `requestBody` field in OpenAPI describes the body of a request that an API client can send to the server, including the content types supported and the schema for the body content. When the endpoint handler method accepts parameters that are bound from the request body, ASP.NET Core generates a corresponding `requestBody` for the operation in the OpenAPI document. Metadata for the request body can also be specified using attributes or extension methods. Additional metadata can be set with a [document transformer](xref:fundamentals/openapi/customize-openapi#use-document-transformers) or [operation transformer](xref:fundamentals/openapi/customize-openapi#use-operation-transformers). @@ -190,14 +190,14 @@ Other mechanisms for setting request body metadata depend on the type of app bei #### [Minimal APIs](#tab/minimal-apis) The content types for the request body in the generated OpenAPI document are determined from the type of the parameter that is bound to the request body or specified with the extension method. -By default, the content type of a [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) parameter will be `application/json` and the content type for [`FromForm`](xref:Microsoft.AspNetCore.Mvc.FromFormAttribute) parameter(s) will be `multipart/form-data` or `application/x-www-form-urlencoded`. +By default, the content type of a [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) parameter will be `application/json` and the content type for [`FromForm`](xref:Microsoft.AspNetCore.Mvc.FromFormAttribute) parameters is `multipart/form-data` or `application/x-www-form-urlencoded`. Support for these default content types is built in to Minimal APIs, and other content types can be handled by using custom binding. See the [Custom binding](xref:fundamentals/minimal-apis/parameter-binding#custom-binding) topic of the Minimal APIs documentation for more information. There are several ways to specify a different content type for the request body. -If the type of the [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) parameter implements , ASP.NET Core uses this interface to determine the content type(s) in the request body. -The framework uses the method of this interface to set the content type(s) and type of the body content of the request body. For example, a `Todo` class that accepts either `application/xml` or `text/xml` content-type can use to provide this information to the framework. +If the type of the [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) parameter implements , ASP.NET Core uses this interface to determine the content types in the request body. +The framework uses the method of this interface to set the content types and type of the body content of the request body. For example, a `Todo` class that accepts either `application/xml` or `text/xml` content-type can use to provide this information to the framework. ```csharp public class Todo : IEndpointParameterMetadataProvider @@ -237,20 +237,20 @@ If you specify #### [Controllers](#tab/controllers) -In controller-based apps, the content type(s) for the request body in the generated OpenAPI document are determined from the type of the parameter that is bound to the request body, the types configured in the application, or by a [`[Consumes]`](xref:Microsoft.AspNetCore.Mvc.ConsumesAttribute) attribute on the route handler method. +In controller-based apps, the content types for the request body in the generated OpenAPI document are determined from the type of the parameter that is bound to the request body, the types configured in the application, or by a [`[Consumes]`](xref:Microsoft.AspNetCore.Mvc.ConsumesAttribute) attribute on the route handler method. ASP.NET Core uses an to deserialize a [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) request body. InputFormatters are configured in the passed to the extension method for the app's service collection. -Each input formatter declares the content types it can handle, in its property, and the type(s) of body content it can handle, with its method. +Each input formatter declares the content types it can handle, in its property, and the types of body content it can handle, with its method. ASP.NET Core MVC includes built-in input formatters for JSON and XML, though only the JSON input formatter is enabled by default. The built-in JSON input formatter supports the `application/json`, `text/json`, and `application/*+json` content types, and the built-in XML input formatter supports the `application/xml`, `text/xml`, and `application/*+xml` content types. -By default, the content type of a [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) request body may be any content type accepted by an for the [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) parameter type. For a request body with [`FromForm`](xref:Microsoft.AspNetCore.Mvc.FromFormAttribute) parameter(s) the default content types are `multipart/form-data` or `application/x-www-form-urlencoded`.These content types will be included in the generated OpenAPI document if the [`[Consumes]`](xref:Microsoft.AspNetCore.Mvc.ConsumesAttribute) attribute is not specified on the route handler method. +By default, the content type of a [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) request body may be any content type accepted by an for the [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) parameter type. For a request body with [`FromForm`](xref:Microsoft.AspNetCore.Mvc.FromFormAttribute) parameters the default content types are `multipart/form-data` or `application/x-www-form-urlencoded`.These content types will be included in the generated OpenAPI document if the [`[Consumes]`](xref:Microsoft.AspNetCore.Mvc.ConsumesAttribute) attribute is not specified on the route handler method. -The content type(s) accepted by a route handler can be restricted using a [filter](xref:mvc/controllers/filters) on the endpoint (action scope). +The content types accepted by a route handler can be restricted using a [filter](xref:mvc/controllers/filters) on the endpoint (action scope). The [`[Consumes]`](xref:Microsoft.AspNetCore.Mvc.ConsumesAttribute) attribute adds an action scope filter to the endpoint that restricts the content types that a route handler will accept. -In this case, the requestBody in the generated OpenAPI document will include only the content type(s) specified in the [`[Consumes]`](xref:Microsoft.AspNetCore.Mvc.ConsumesAttribute) attribute. +In this case, the requestBody in the generated OpenAPI document will include only the content types specified in the [`[Consumes]`](xref:Microsoft.AspNetCore.Mvc.ConsumesAttribute) attribute. A [`[Consumes]`](xref:Microsoft.AspNetCore.Mvc.ConsumesAttribute) attribute can't add support for a content type that doesn't have an associated input formatter, and the generated OpenAPI document doesn't include any content types that don't have an associated input formatter. @@ -263,7 +263,7 @@ If the route handler doesn't have a [`FromBody`](xref:Microsoft.AspNetCore.Mvc.F ### Describe response types -OpenAPI supports providing a description of the responses returned from an API. ASP.NET Core provides several strategies for setting the response metadata of an endpoint. Response metadata that can be set includes the status code, the type of the response body, and content type(s) of a response. Responses in OpenAPI may have additional metadata, such as description, headers, links, and examples. This additional metadata can be set with a [document transformer](xref:fundamentals/openapi/customize-openapi#use-document-transformers) or [operation transformer](xref:fundamentals/openapi/customize-openapi#use-operation-transformers). +OpenAPI supports providing a description of the responses returned from an API. ASP.NET Core provides several strategies for setting the response metadata of an endpoint. Response metadata that can be set includes the status code, the type of the response body, and content types of a response. Responses in OpenAPI may have additional metadata, such as description, headers, links, and examples. This additional metadata can be set with a [document transformer](xref:fundamentals/openapi/customize-openapi#use-document-transformers) or [operation transformer](xref:fundamentals/openapi/customize-openapi#use-operation-transformers). The specific mechanisms for setting response metadata depend on the type of app being developed. @@ -271,10 +271,10 @@ The specific mechanisms for setting response metadata depend on the type of app In Minimal API apps, ASP.NET Core can extract the response metadata added by extension methods on the endpoint, attributes on the route handler, and the return type of the route handler. -* The extension method can be used on the endpoint to specify the status code, the type of the response body, and content type(s) of a response from an endpoint. +* The extension method can be used on the endpoint to specify the status code, the type of the response body, and content types of a response from an endpoint. * The [`[ProducesResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute) or attribute can be used to specify the type of the response body. -* A route handler can be used to return a type that implements to specify the type and content-type(s) of the response body. -* The extension method on the endpoint can be used to specify the status code and content-type(s) of an error response. +* A route handler can be used to return a type that implements to specify the type and content-types of the response body. +* The extension method on the endpoint can be used to specify the status code and content-types of an error response. Note that the and extension methods are supported on both and on . This allows, for example, a common set of error responses to be defined for all operations in a group. @@ -360,10 +360,10 @@ If an endpoint can return different response types in different scenarios, you c In controller-based apps, ASP.NET Core can extract the response metadata from the action method signature, attributes, and conventions. -* You can use the [`[ProducesResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute) or attribute to specify the status code, the type of the response body, and content type(s) of a response from an action method. +* You can use the [`[ProducesResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute) or attribute to specify the status code, the type of the response body, and content types of a response from an action method. * You can use the [`[Produces]`](xref:Microsoft.AspNetCore.Mvc.ProducesAttribute) or attribute to specify the type of the response body. * You can use the [`[ProducesDefaultResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesDefaultResponseTypeAttribute) attribute to specify the response body type for the "default" response. -* You can use the [`[ProducesErrorResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesErrorResponseTypeAttribute) attribute to specify the response body type for an error response. However, be aware that this is only complements the status code and content type(s) specified by an [`[ProducesResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute) attribute with a 4XX status code. +* You can use the [`[ProducesErrorResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesErrorResponseTypeAttribute) attribute to specify the response body type for an error response. However, be aware that this is only complements the status code and content types specified by an [`[ProducesResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute) attribute with a 4XX status code. Only one [`[Produces]`](xref:Microsoft.AspNetCore.Mvc.ProducesAttribute) or attributes may be applied to an action method, but multiple [`[ProducesResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute) or attributes with different status codes may be applied to a single action method. diff --git a/aspnetcore/fundamentals/servers/kestrel/when-to-use-a-reverse-proxy.md b/aspnetcore/fundamentals/servers/kestrel/when-to-use-a-reverse-proxy.md index 6a721bc72e44..4f0c87f24c1b 100644 --- a/aspnetcore/fundamentals/servers/kestrel/when-to-use-a-reverse-proxy.md +++ b/aspnetcore/fundamentals/servers/kestrel/when-to-use-a-reverse-proxy.md @@ -39,7 +39,7 @@ A reverse proxy: * Can limit the exposed public surface area of the apps that it hosts. * Provides an additional layer of configuration and defense-in-depth cybersecurity. * Might integrate better with existing infrastructure. -* Simplifies load balancing and secure communication (HTTPS) configuration. Only the reverse proxy server requires the X.509 certificate for the public domain(s). That server can communicate with the app's servers on the internal network using plain HTTP or HTTPS with locally managed certificates. Internal HTTPS increases security but adds significant overhead. +* Simplifies load balancing and secure communication (HTTPS) configuration. Only the reverse proxy server requires the X.509 certificate for the public domain. That server can communicate with the app's servers on the internal network using plain HTTP or HTTPS with locally managed certificates. Internal HTTPS increases security but adds significant overhead. > [!WARNING] > Hosting in a reverse proxy configuration requires [host filtering](xref:fundamentals/servers/kestrel/host-filtering). diff --git a/aspnetcore/fundamentals/servers/yarp/extensibility.md b/aspnetcore/fundamentals/servers/yarp/extensibility.md index 098a7517fa67..c52136f2f967 100644 --- a/aspnetcore/fundamentals/servers/yarp/extensibility.md +++ b/aspnetcore/fundamentals/servers/yarp/extensibility.md @@ -32,7 +32,7 @@ Most of the prebuilt pipeline can be customized through code: * [Request Transforms](xref:fundamentals/servers/yarp/transform-extensibility) * [HttpClient configuration](./http-client-config.md#code-configuration) -You can also change the pipeline definition to replace modules with your own implementation(s) or add additional modules as needed. For more information see [Middleware](xref:fundamentals/servers/yarp/middleware). +You can also change the pipeline definition to replace modules with your own implementations or add additional modules as needed. For more information see [Middleware](xref:fundamentals/servers/yarp/middleware). ## HTTP Forwarder diff --git a/aspnetcore/fundamentals/servers/yarp/header-routing.md b/aspnetcore/fundamentals/servers/yarp/header-routing.md index 2d110691f0d2..5c55702bbf97 100644 --- a/aspnetcore/fundamentals/servers/yarp/header-routing.md +++ b/aspnetcore/fundamentals/servers/yarp/header-routing.md @@ -289,7 +289,7 @@ A list of possible values to search for. The header must match at least one of t ### Mode -[HeaderMatchMode](xref:Yarp.ReverseProxy.Configuration.HeaderMatchMode) specifies how to match the value(s) against the request header. The default is `ExactHeader`. +[HeaderMatchMode](xref:Yarp.ReverseProxy.Configuration.HeaderMatchMode) specifies how to match the values against the request header. The default is `ExactHeader`. * ExactHeader - Any of the headers with the given name must match in its entirety, subject to the value of `IsCaseSensitive`. If a header contains multiple values (separated by `,` or `;`), they are split before matching. A single pair of quotes will also be stripped from the value before matching. * HeaderPrefix - Any of the headers with the given name must match by prefix, subject to the value of `IsCaseSensitive`. If a header contains multiple values (separated by `,` or `;`), they are split before matching. A single pair of quotes will also be stripped from the value before matching. diff --git a/aspnetcore/fundamentals/servers/yarp/https-tls.md b/aspnetcore/fundamentals/servers/yarp/https-tls.md index 146e145f1307..4a8f18f9a62c 100644 --- a/aspnetcore/fundamentals/servers/yarp/https-tls.md +++ b/aspnetcore/fundamentals/servers/yarp/https-tls.md @@ -16,7 +16,7 @@ HTTPS (HTTP over TLS encrypted connections) is the standard way to make HTTP req ## TLS Termination -YARP is a level 7 HTTP proxy which means that incoming HTTPS/TLS connections are fully decrypted by the proxy so it can process and forward the HTTP requests. This is commonly known as TLS Termination. The outgoing connections to the destination(s) may or may not be encrypted, depending on the configuration provided. +YARP is a level 7 HTTP proxy which means that incoming HTTPS/TLS connections are fully decrypted by the proxy so it can process and forward the HTTP requests. This is commonly known as TLS Termination. The outgoing connections to the destinations may or may not be encrypted, depending on the configuration provided. ## TLS tunneling (CONNECT) diff --git a/aspnetcore/fundamentals/servers/yarp/queryparameter-routing.md b/aspnetcore/fundamentals/servers/yarp/queryparameter-routing.md index 1883c1e6e3e8..4c856dd4c18d 100644 --- a/aspnetcore/fundamentals/servers/yarp/queryparameter-routing.md +++ b/aspnetcore/fundamentals/servers/yarp/queryparameter-routing.md @@ -252,7 +252,7 @@ A list of possible values to search for. The query parameter must match at least ### Mode -[QueryParameterMatchMode](xref:Yarp.ReverseProxy.Configuration.QueryParameterMatchMode) specifies how to match the value(s) against the request query parameter. The default is `Exact`. +[QueryParameterMatchMode](xref:Yarp.ReverseProxy.Configuration.QueryParameterMatchMode) specifies how to match the values against the request query parameter. The default is `Exact`. * Exact - The query parameter must match in its entirety, subject to the value of `IsCaseSensitive`. Only single query parameters are supported. If there are multiple query parameters with the same name then the match fails. * Prefix - The query parameter must match by prefix, subject to the value of `IsCaseSensitive`. Only single query parameters are supported. If there are multiple query parameters with the same name then the match fails. diff --git a/aspnetcore/mvc/controllers/filters.md b/aspnetcore/mvc/controllers/filters.md index e5e14a1783b4..8fcc979c0b20 100644 --- a/aspnetcore/mvc/controllers/filters.md +++ b/aspnetcore/mvc/controllers/filters.md @@ -105,7 +105,7 @@ Interfaces for multiple filter stages can be implemented in a single class. For * Asynchronous: and * -Implement **either** the synchronous or the async version of a filter interface, **not** both. The runtime checks first to see if the filter implements the async interface, and if so, it calls that. If not, it calls the synchronous interface's method(s). If both asynchronous and synchronous interfaces are implemented in one class, only the async method is called. When using abstract classes like , override only the synchronous methods or the asynchronous methods for each filter type. +Implement **either** the synchronous or the async version of a filter interface, **not** both. The runtime checks first to see if the filter implements the async interface, and if so, it calls that. If not, it calls the synchronous interface's methods. If both asynchronous and synchronous interfaces are implemented in one class, only the async method is called. When using abstract classes like , override only the synchronous methods or the asynchronous methods for each filter type. ### Built-in filter attributes diff --git a/aspnetcore/mvc/controllers/filters/includes/filters7.md b/aspnetcore/mvc/controllers/filters/includes/filters7.md index 779512c93233..53d85822eec4 100644 --- a/aspnetcore/mvc/controllers/filters/includes/filters7.md +++ b/aspnetcore/mvc/controllers/filters/includes/filters7.md @@ -97,7 +97,7 @@ Interfaces for multiple filter stages can be implemented in a single class. For * Asynchronous: and * -Implement **either** the synchronous or the async version of a filter interface, **not** both. The runtime checks first to see if the filter implements the async interface, and if so, it calls that. If not, it calls the synchronous interface's method(s). If both asynchronous and synchronous interfaces are implemented in one class, only the async method is called. When using abstract classes like , override only the synchronous methods or the asynchronous methods for each filter type. +Implement **either** the synchronous or the async version of a filter interface, **not** both. The runtime checks first to see if the filter implements the async interface, and if so, it calls that. If not, it calls the synchronous interface's methods. If both asynchronous and synchronous interfaces are implemented in one class, only the async method is called. When using abstract classes like , override only the synchronous methods or the asynchronous methods for each filter type. ### Built-in filter attributes @@ -617,7 +617,7 @@ Interfaces for multiple filter stages can be implemented in a single class. For * Asynchronous: and * -Implement **either** the synchronous or the async version of a filter interface, **not** both. The runtime checks first to see if the filter implements the async interface, and if so, it calls that. If not, it calls the synchronous interface's method(s). If both asynchronous and synchronous interfaces are implemented in one class, only the async method is called. When using abstract classes like , override only the synchronous methods or the asynchronous methods for each filter type. +Implement **either** the synchronous or the async version of a filter interface, **not** both. The runtime checks first to see if the filter implements the async interface, and if so, it calls that. If not, it calls the synchronous interface's methods. If both asynchronous and synchronous interfaces are implemented in one class, only the async method is called. When using abstract classes like , override only the synchronous methods or the asynchronous methods for each filter type. ### Built-in filter attributes diff --git a/aspnetcore/razor-pages/filter.md b/aspnetcore/razor-pages/filter.md index f189fd87c278..723f042eeb1c 100644 --- a/aspnetcore/razor-pages/filter.md +++ b/aspnetcore/razor-pages/filter.md @@ -41,7 +41,7 @@ Razor Page filters provide the following methods, which can be applied globally * : Called asynchronously after the handler method has been selected, but before model binding occurs. * : Called asynchronously before the handler method is invoked, after model binding is complete. -Implement **either** the synchronous or the async version of a filter interface, **not** both. The framework checks first to see if the filter implements the async interface, and if so, it calls that. If not, it calls the synchronous interface's method(s). If both interfaces are implemented, only the async methods are called. The same rule applies to overrides in pages, implement the synchronous or the async version of the override, not both. +Implement **either** the synchronous or the async version of a filter interface, **not** both. The framework checks first to see if the filter implements the async interface, and if so, it calls that. If not, it calls the synchronous interface's methods. If both interfaces are implemented, only the async methods are called. The same rule applies to overrides in pages, implement the synchronous or the async version of the override, not both. ## Implement Razor Page filters globally @@ -133,7 +133,7 @@ Razor Page filters provide the following methods, which can be applied globally * : Called asynchronously before the handler method is invoked, after model binding is complete. > [!NOTE] -> Implement **either** the synchronous or the async version of a filter interface, not both. The framework checks first to see if the filter implements the async interface, and if so, it calls that. If not, it calls the synchronous interface's method(s). If both interfaces are implemented, only the async methods are called. The same rule applies to overrides in pages, implement the synchronous or the async version of the override, not both. +> Implement **either** the synchronous or the async version of a filter interface, not both. The framework checks first to see if the filter implements the async interface, and if so, it calls that. If not, it calls the synchronous interface's methods. If both interfaces are implemented, only the async methods are called. The same rule applies to overrides in pages, implement the synchronous or the async version of the override, not both. ## Implement Razor Page filters globally diff --git a/aspnetcore/security/authentication/index.md b/aspnetcore/security/authentication/index.md index 86d89fa929fd..a223a999d44a 100644 --- a/aspnetcore/security/authentication/index.md +++ b/aspnetcore/security/authentication/index.md @@ -110,7 +110,7 @@ An authentication scheme's authenticate action is responsible for constructing t ### Challenge -An authentication challenge is invoked by Authorization when an unauthenticated user requests an endpoint that requires authentication. An authentication challenge is issued, for example, when an anonymous user requests a restricted resource or follows a login link. Authorization invokes a challenge using the specified authentication scheme(s), or the default if none is specified. See . Authentication challenge examples include: +An authentication challenge is invoked by Authorization when an unauthenticated user requests an endpoint that requires authentication. An authentication challenge is issued, for example, when an anonymous user requests a restricted resource or follows a login link. Authorization invokes a challenge using the specified authentication schemes, or the default if none is specified. See . Authentication challenge examples include: * A cookie authentication scheme redirecting the user to a login page. * A JWT bearer scheme returning a 401 result with a `www-authenticate: bearer` header. @@ -259,7 +259,7 @@ An authentication scheme's authenticate action is responsible for constructing t ### Challenge -An authentication challenge is invoked by Authorization when an unauthenticated user requests an endpoint that requires authentication. An authentication challenge is issued, for example, when an anonymous user requests a restricted resource or follows a login link. Authorization invokes a challenge using the specified authentication scheme(s), or the default if none is specified. See . Authentication challenge examples include: +An authentication challenge is invoked by Authorization when an unauthenticated user requests an endpoint that requires authentication. An authentication challenge is issued, for example, when an anonymous user requests a restricted resource or follows a login link. Authorization invokes a challenge using the specified authentication schemes, or the default if none is specified. See . Authentication challenge examples include: * A cookie authentication scheme redirecting the user to a login page. * A JWT bearer scheme returning a 401 result with a `www-authenticate: bearer` header. @@ -402,7 +402,7 @@ An authentication scheme's authenticate action is responsible for constructing t ### Challenge -An authentication challenge is invoked by Authorization when an unauthenticated user requests an endpoint that requires authentication. An authentication challenge is issued, for example, when an anonymous user requests a restricted resource or follows a login link. Authorization invokes a challenge using the specified authentication scheme(s), or the default if none is specified. See . Authentication challenge examples include: +An authentication challenge is invoked by Authorization when an unauthenticated user requests an endpoint that requires authentication. An authentication challenge is issued, for example, when an anonymous user requests a restricted resource or follows a login link. Authorization invokes a challenge using the specified authentication schemes, or the default if none is specified. See . Authentication challenge examples include: * A cookie authentication scheme redirecting the user to a login page. * A JWT bearer scheme returning a 401 result with a `www-authenticate: bearer` header. diff --git a/aspnetcore/signalr/background-services.md b/aspnetcore/signalr/background-services.md index 06652a227530..8f8cf1465ace 100644 --- a/aspnetcore/signalr/background-services.md +++ b/aspnetcore/signalr/background-services.md @@ -150,7 +150,7 @@ During the `IHostedService.StopAsync` method, the `HubConnection` is disposed of ## Enable SignalR in startup -Hosting ASP.NET Core SignalR Hubs in the context of a background worker process is identical to hosting a Hub in an ASP.NET Core web app. In the `Startup.ConfigureServices` method, calling `services.AddSignalR` adds the required services to the ASP.NET Core Dependency Injection (DI) layer to support SignalR. In `Startup.Configure`, the `UseSignalR` method is called to connect the Hub endpoint(s) in the ASP.NET Core request pipeline. +Hosting ASP.NET Core SignalR Hubs in the context of a background worker process is identical to hosting a Hub in an ASP.NET Core web app. In the `Startup.ConfigureServices` method, calling `services.AddSignalR` adds the required services to the ASP.NET Core Dependency Injection (DI) layer to support SignalR. In `Startup.Configure`, the `UseSignalR` method is called to connect the Hub endpoints in the ASP.NET Core request pipeline. [!code-csharp[Startup](background-service/samples/2.2/Server/Startup.cs?name=Startup)] From 23a18be50a10d5c00de1b9c3acf26f40ddaf2845 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Wed, 11 Feb 2026 11:48:07 -0500 Subject: [PATCH 2/3] Update aspnetcore/fundamentals/openapi/includes/include-metadata10.md --- aspnetcore/fundamentals/openapi/includes/include-metadata10.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/fundamentals/openapi/includes/include-metadata10.md b/aspnetcore/fundamentals/openapi/includes/include-metadata10.md index 8d635a083e8a..60d1ac75a0f5 100644 --- a/aspnetcore/fundamentals/openapi/includes/include-metadata10.md +++ b/aspnetcore/fundamentals/openapi/includes/include-metadata10.md @@ -191,7 +191,7 @@ Other mechanisms for setting request body metadata depend on the type of app bei #### [Minimal APIs](#tab/minimal-apis) The content types for the request body in the generated OpenAPI document are determined from the type of the parameter that is bound to the request body or specified with the extension method. -By default, the content type of a [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) parameter will be `application/json` and the content type for [`FromForm`](xref:Microsoft.AspNetCore.Mvc.FromFormAttribute) parameters is `multipart/form-data` or `application/x-www-form-urlencoded`. +By default, the content type of a [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) parameter is `application/json`, and the content type for [`FromForm`](xref:Microsoft.AspNetCore.Mvc.FromFormAttribute) parameters is `multipart/form-data` or `application/x-www-form-urlencoded`. Support for these default content types is built in to Minimal APIs, and other content types can be handled by using custom binding. See the [Custom binding](xref:fundamentals/minimal-apis/parameter-binding#custom-binding) topic of the Minimal APIs documentation for more information. From 8e19d2546e081ca32724da08cc8fe6f944530413 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Wed, 11 Feb 2026 11:48:58 -0500 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: Wade Pickett --- .../fundamentals/openapi/includes/include-metadata10.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aspnetcore/fundamentals/openapi/includes/include-metadata10.md b/aspnetcore/fundamentals/openapi/includes/include-metadata10.md index 60d1ac75a0f5..d47056df7a15 100644 --- a/aspnetcore/fundamentals/openapi/includes/include-metadata10.md +++ b/aspnetcore/fundamentals/openapi/includes/include-metadata10.md @@ -256,7 +256,7 @@ Each input formatter declares the content types it can handle, in its for the [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) parameter type. For a request body with [`FromForm`](xref:Microsoft.AspNetCore.Mvc.FromFormAttribute) parameters the default content types are `multipart/form-data` or `application/x-www-form-urlencoded`.These content types will be included in the generated OpenAPI document if the [`[Consumes]`](xref:Microsoft.AspNetCore.Mvc.ConsumesAttribute) attribute is not specified on the route handler method. +By default, the content type of a [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) request body may be any content type accepted by an for the [`FromBody`](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute) parameter type. For a request body with [`FromForm`](xref:Microsoft.AspNetCore.Mvc.FromFormAttribute) parameters the default content types are `multipart/form-data` or `application/x-www-form-urlencoded`. These content types will be included in the generated OpenAPI document if the [`[Consumes]`](xref:Microsoft.AspNetCore.Mvc.ConsumesAttribute) attribute is not specified on the route handler method. The content types accepted by a route handler can be restricted using a [filter](xref:mvc/controllers/filters) on the endpoint (action scope). The [`[Consumes]`](xref:Microsoft.AspNetCore.Mvc.ConsumesAttribute) attribute adds an action scope filter to the endpoint that restricts the content types that a route handler will accept. @@ -384,7 +384,7 @@ In controller-based apps, ASP.NET Core can extract the response metadata from th * You can use the [`[ProducesResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute) or attribute to specify the status code, the type of the response body, and content types of a response from an action method. * You can use the [`[Produces]`](xref:Microsoft.AspNetCore.Mvc.ProducesAttribute) or attribute to specify the type of the response body. * You can use the [`[ProducesDefaultResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesDefaultResponseTypeAttribute) attribute to specify the response body type for the "default" response. -* You can use the [`[ProducesErrorResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesErrorResponseTypeAttribute) attribute to specify the response body type for an error response. However, be aware that this is only complements the status code and content types specified by an [`[ProducesResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute) attribute with a 4XX status code. +* You can use the [`[ProducesErrorResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesErrorResponseTypeAttribute) attribute to specify the response body type for an error response. However, be aware that this only complements the status code and content types specified by an [`[ProducesResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute) attribute with a 4XX status code. Only one [`[Produces]`](xref:Microsoft.AspNetCore.Mvc.ProducesAttribute) or attributes may be applied to an action method, but multiple [`[ProducesResponseType]`](xref:Microsoft.AspNetCore.Mvc.ProducesResponseTypeAttribute) or attributes with different status codes may be applied to a single action method.