Skip to content

Commit f91ed8f

Browse files
Merge pull request #243116 from mattchenderson/func-asp-prev2
updating content for new preview version
2 parents da464b6 + 489ae35 commit f91ed8f

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

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

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -258,32 +258,25 @@ The following example demonstrates the use of `HttpRequestData` and `HttpRespons
258258
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).
259259

260260
> [!NOTE]
261-
> 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. In the initial preview versions of the integration package, route info is missing from the `HttpRequest` and `HttpContext` objects, and accessing route parameters should be done through the `FunctionContext` object or via parameter injection.
261+
> 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.
262262
263-
1. Add a reference to the [Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore NuGet package](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore) to your project.
263+
1. Add a reference to the [Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore NuGet package, version 1.0.0-preview2 or later](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore/1.0.0-preview2) to your project.
264264

265-
You must also update your project to use [version 1.10.0 or later of Microsoft.Azure.Functions.Worker.Sdk](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Sdk/1.10.0) and [version 1.14.1 or later of Microsoft.Azure.Functions.Worker](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker/1.14.1).
265+
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).
266266

267-
2. In your `Program.cs` file, update the host builder configuration to include the `UseAspNetCoreIntegration()` and `ConfigureAspNetCoreIntegration()` methods. The following example shows a minimal setup without other customizations:
267+
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:
268268

269269
```csharp
270270
using Microsoft.Extensions.Hosting;
271271
using Microsoft.Azure.Functions.Worker;
272272

273273
var host = new HostBuilder()
274-
.ConfigureFunctionsWorkerDefaults(workerApplication =>
275-
{
276-
workerApplication.UseAspNetCoreIntegration();
277-
})
278-
.ConfigureAspNetCoreIntegration()
274+
.ConfigureFunctionsWebApplication()
279275
.Build();
280276

281277
host.Run();
282278
```
283279

284-
> [!NOTE]
285-
> Initial preview versions of the integration package require both `UseAspNetCoreIntegration()` and `ConfigureAspNetCoreIntegration()` to be called, but these setup steps are not yet finalized.
286-
287280
3. You can then update your HTTP-triggered functions to use the ASP.NET Core types. The following example shows `HttpRequest` and an `IActionResult` used for a simple "hello, world" function:
288281

289282
```csharp

0 commit comments

Comments
 (0)