Skip to content

Commit 36339ba

Browse files
updating ASP.NET core integration to GA
1 parent bf28312 commit 36339ba

8 files changed

+23
-24
lines changed

articles/azure-functions/dotnet-isolated-in-process-differences.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Use the following table to compare feature and functional differences between th
2828
| Binding extension packages | [Microsoft.Azure.WebJobs.Extensions.*](https://www.nuget.org/packages?q=Microsoft.Azure.WebJobs.Extensions) | [Microsoft.Azure.Functions.Worker.Extensions.*](https://www.nuget.org/packages?q=Microsoft.Azure.Functions.Worker.Extensions) |
2929
| Durable Functions | [Supported](durable/durable-functions-overview.md) | [Supported](durable/durable-functions-isolated-create-first-csharp.md?pivots=code-editor-visualstudio) (Support does not yet include Durable Entities) |
3030
| Model types exposed by bindings | Simple types<br/>[JSON serializable](/dotnet/api/system.text.json.jsonserializeroptions) types<br/>Arrays/enumerations<br/>Service SDK types<sup>4</sup> | Simple types<br/>JSON serializable types<br/>Arrays/enumerations<br/>[Service SDK types](dotnet-isolated-process-guide.md#sdk-types)<sup>4</sup> |
31-
| HTTP trigger model types| [HttpRequest] / [IActionResult]<sup>5</sup><br/>[HttpRequestMessage] / [HttpResponseMessage] | [HttpRequestData] / [HttpResponseData]<br/>[HttpRequest] / [IActionResult] (as a [public preview extension][aspnetcore-integration])<sup>5</sup>|
31+
| HTTP trigger model types| [HttpRequest] / [IActionResult]<sup>5</sup><br/>[HttpRequestMessage] / [HttpResponseMessage] | [HttpRequestData] / [HttpResponseData]<br/>[HttpRequest] / [IActionResult] (using [ASP.NET Core integration][aspnetcore-integration])<sup>5</sup>|
3232
| Output binding interactions | Return values (single output only),<br/>`out` parameters,<br/>`IAsyncCollector` | Return values in an expanded model with:<br/> - single or [multiple outputs](dotnet-isolated-process-guide.md#multiple-output-bindings)<br/> - arrays of outputs|
3333
| Imperative bindings<sup>1</sup> | [Supported](functions-dotnet-class-library.md#binding-at-runtime) | Not supported |
3434
| Dependency injection | [Supported](functions-dotnet-dependency-injection.md) | [Supported](dotnet-isolated-process-guide.md#dependency-injection) (improved model consistent with .NET ecosystem) |
@@ -56,7 +56,7 @@ Use the following table to compare feature and functional differences between th
5656
[HttpRequestMessage]: /dotnet/api/system.net.http.httprequestmessage
5757
[HttpResponseMessage]: /dotnet/api/system.net.http.httpresponsemessage
5858

59-
[aspnetcore-integration]: ./dotnet-isolated-process-guide.md#aspnet-core-integration-preview
59+
[aspnetcore-integration]: ./dotnet-isolated-process-guide.md#aspnet-core-integration
6060

6161
[!INCLUDE [functions-dotnet-supported-versions](../../includes/functions-dotnet-supported-versions.md)]
6262

articles/azure-functions/dotnet-isolated-process-guide.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -320,29 +320,19 @@ The [SDK type binding samples](https://github.com/Azure/azure-functions-dotnet-w
320320

321321
[HTTP triggers](./functions-bindings-http-webhook-trigger.md) allow a function to be invoked by an HTTP request. There are two different approaches that can be used:
322322

323+
- An [ASP.NET Core integration model](#aspnet-core-integration) that uses concepts familiar to ASP.NET Core developers
323324
- A [built-in model](#built-in-http-model) which does not require additional dependencies and uses custom types for HTTP requests and responses
324-
- An [ASP.NET Core integration model (Preview)](#aspnet-core-integration-preview) that uses concepts familiar to ASP.NET Core developers
325325

326-
#### Built-in HTTP model
327-
328-
In the built-in model, the system translates the incoming HTTP request message into an [HttpRequestData] object that is passed to the function. This object provides data from the request, including `Headers`, `Cookies`, `Identities`, `URL`, and optionally a message `Body`. This object is a representation of the HTTP request but is not directly connected to the underlying HTTP listener or the received message.
329-
330-
Likewise, the function returns an [HttpResponseData] object, which provides data used to create the HTTP response, including message `StatusCode`, `Headers`, and optionally a message `Body`.
331-
332-
The following example demonstrates the use of `HttpRequestData` and `HttpResponseData`:
333-
334-
:::code language="csharp" source="~/azure-functions-dotnet-worker/samples/Extensions/Http/HttpFunction.cs" id="docsnippet_http_trigger" :::
335-
336-
#### ASP.NET Core integration (preview)
326+
#### ASP.NET Core integration
337327

338-
This section shows how to work with the underlying HTTP request and response objects using types from ASP.NET Core including [HttpRequest], [HttpResponse], and [IActionResult]. Use of this feature for local testing requires [Core Tools version 4.0.5198 or later](./functions-run-local.md). This model is not available to [apps targeting .NET Framework][supported-versions], which should instead leverage the [built-in model](#built-in-http-model).
328+
This section shows how to work with the underlying HTTP request and response objects using types from ASP.NET Core including [HttpRequest], [HttpResponse], and [IActionResult]. Use of this feature for local testing requires [Core Tools version 4.0.5240 or later](./functions-run-local.md) and that you set `AzureWebJobsFeatureFlags` to "EnableHttpProxying" in `local.settings.json` if you are using Core Tools version 4.0.5274 and earlier. This model is not available to [apps targeting .NET Framework][supported-versions], which should instead leverage the [built-in model](#built-in-http-model).
339329

340330
> [!NOTE]
341331
> Not all features of ASP.NET Core are exposed by this model. Specifically, the ASP.NET Core middleware pipeline and routing capabilities are not available.
342332
343-
1. Add a reference to the [Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore NuGet package, version 1.0.0-preview4 or later](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore/1.0.0-preview4) to your project.
333+
1. Add a reference to the [Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore NuGet package, version 1.0.0 or later](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore/) to your project.
344334

345-
You must also update your project to use [version 1.11.0 or later of Microsoft.Azure.Functions.Worker.Sdk](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Sdk/1.11.0) and [version 1.16.0 or later of Microsoft.Azure.Functions.Worker](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker/1.16.0).
335+
You must also update your project to use [version 1.11.0 or later of Microsoft.Azure.Functions.Worker.Sdk](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Sdk/) and [version 1.16.0 or later of Microsoft.Azure.Functions.Worker](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker/).
346336

347337
2. In your `Program.cs` file, update the host builder configuration to use `ConfigureFunctionsWebApplication()` instead of `ConfigureFunctionsWorkerDefaults()`. The following example shows a minimal setup without other customizations:
348338

@@ -368,7 +358,16 @@ This section shows how to work with the underlying HTTP request and response obj
368358
}
369359
```
370360

371-
4. Enable the feature by setting `AzureWebJobsFeatureFlags` to include "EnableHttpProxying". When hosted in a function app, configure this as an application setting. When running locally, set this value in `local.settings.json`.
361+
#### Built-in HTTP model
362+
363+
In the built-in model, the system translates the incoming HTTP request message into an [HttpRequestData] object that is passed to the function. This object provides data from the request, including `Headers`, `Cookies`, `Identities`, `URL`, and optionally a message `Body`. This object is a representation of the HTTP request but is not directly connected to the underlying HTTP listener or the received message.
364+
365+
Likewise, the function returns an [HttpResponseData] object, which provides data used to create the HTTP response, including message `StatusCode`, `Headers`, and optionally a message `Body`.
366+
367+
The following example demonstrates the use of `HttpRequestData` and `HttpResponseData`:
368+
369+
:::code language="csharp" source="~/azure-functions-dotnet-worker/samples/Extensions/Http/HttpFunction.cs" id="docsnippet_http_trigger" :::
370+
372371

373372
## Logging
374373

articles/azure-functions/functions-bindings-http-webhook-output.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ The HTTP triggered function returns a type of [IActionResult] or `Task<IActionRe
6767

6868
# [Isolated process](#tab/isolated-process)
6969

70-
The HTTP triggered function returns an [HttpResponseData](/dotnet/api/microsoft.azure.functions.worker.http.httpresponsedata) object or a `Task<HttpResponseData>`. If the app uses [ASP.NET Core integration in .NET Isolated](./dotnet-isolated-process-guide.md#aspnet-core-integration-preview), it could also use [IActionResult], `Task<IActionResult>`, [HttpResponse], or `Task<HttpResponse>`.
70+
The HTTP triggered function returns an [HttpResponseData](/dotnet/api/microsoft.azure.functions.worker.http.httpresponsedata) object or a `Task<HttpResponseData>`. If the app uses [ASP.NET Core integration in .NET Isolated](./dotnet-isolated-process-guide.md#aspnet-core-integration), it could also use [IActionResult], `Task<IActionResult>`, [HttpResponse], or `Task<HttpResponse>`.
7171

7272
[IActionResult]: /dotnet/api/microsoft.aspnetcore.mvc.iactionresult
7373
[HttpResponse]: /dotnet/api/microsoft.aspnetcore.http.httpresponse

articles/azure-functions/functions-bindings-http-webhook-trigger.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,7 @@ If a function that uses the HTTP trigger doesn't complete within 230 seconds, th
10561056
- [Return an HTTP response from a function](./functions-bindings-http-webhook-output.md)
10571057

10581058
[ClaimsPrincipal]: /dotnet/api/system.security.claims.claimsprincipal
1059-
[ASP.NET Core integration in .NET Isolated]: ./dotnet-isolated-process-guide.md#aspnet-core-integration-preview
1059+
[ASP.NET Core integration in .NET Isolated]: ./dotnet-isolated-process-guide.md#aspnet-core-integration
10601060
[HttpRequestData]: /dotnet/api/microsoft.azure.functions.worker.http.httprequestdata
10611061
[HttpResponseData]: /dotnet/api/microsoft.azure.functions.worker.http.httpresponsedata
10621062
[HttpRequest]: /dotnet/api/microsoft.aspnetcore.http.httprequest

articles/azure-functions/functions-bindings-http-webhook.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Functions 1.x apps automatically have a reference the [Microsoft.Azure.WebJobs](
4747
Add the extension to your project by installing the [NuGet package](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Http), version 3.x.
4848

4949
> [!NOTE]
50-
> An additional extension package is needed for [ASP.NET Core integration in .NET Isolated](./dotnet-isolated-process-guide.md#aspnet-core-integration-preview)
50+
> An additional extension package is needed for [ASP.NET Core integration in .NET Isolated](./dotnet-isolated-process-guide.md#aspnet-core-integration)
5151
5252
# [Functions v1.x](#tab/functionsv1/isolated-process)
5353

articles/azure-functions/migrate-dotnet-to-isolated-model.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ Some key classes change between the in-process model and the isolated worker mod
156156
| `IActionResult` | `HttpResponseData`, `IActionResult` (using [ASP.NET Core integration])|
157157
| `FunctionsStartup` (attribute) | Uses [`Program.cs`](#programcs-file) instead |
158158

159-
[ASP.NET Core integration]: ./dotnet-isolated-process-guide.md#aspnet-core-integration-preview
159+
[ASP.NET Core integration]: ./dotnet-isolated-process-guide.md#aspnet-core-integration
160160

161161
There might also be class name differences in bindings. For more information, see the reference articles for the specific bindings.
162162

articles/azure-functions/migrate-version-1-version-4.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ Some key classes changed names between version 1.x and version 4.x. These change
316316

317317
---
318318

319-
[ASP.NET Core integration]: ./dotnet-isolated-process-guide.md#aspnet-core-integration-preview
319+
[ASP.NET Core integration]: ./dotnet-isolated-process-guide.md#aspnet-core-integration
320320

321321
There might also be class name differences in bindings. For more information, see the reference articles for the specific bindings.
322322

articles/azure-functions/migrate-version-3-version-4.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ Some key classes changed names between versions. These changes are a result eith
245245

246246
---
247247

248-
[ASP.NET Core integration]: ./dotnet-isolated-process-guide.md#aspnet-core-integration-preview
248+
[ASP.NET Core integration]: ./dotnet-isolated-process-guide.md#aspnet-core-integration
249249

250250
There might also be class name differences in bindings. For more information, see the reference articles for the specific bindings.
251251

0 commit comments

Comments
 (0)