You are starting a new HTTP API project on .NET 8 with Azure Functions. You need full control over the .NET hosting pipeline, the ability to add custom middleware for request/response logging, and isolation from the Functions runtime so you can adopt new .NET versions independently. What hosting model and setup should you choose?
Choose an answer
Tap an option to check your answer.
Correct answer: Use the .NET isolated worker model, configure Program.cs with a Generic Host, call AddFunctionsWorkerDefaults(), and register IFunctionsWorkerMiddleware for custom middleware..
Why this is the answer
The .NET isolated worker model provides full control over the .NET hosting pipeline, allowing independent .NET version adoption and custom middleware integration. Configuring Program.cs with a Generic Host and calling AddFunctionsWorkerDefaults() sets up the Functions worker. Registering IFunctionsWorkerMiddleware enables custom request/response logging within this isolated process. The in-process model (options 2 and 3) tightly couples your function app to the Azure Functions runtime, limiting control over the hosting pipeline and making independent .NET version upgrades difficult. Option 3 also specifies .NET 6, which doesn't meet the .NET 8 requirement. Option 4 uses Node.js, which is irrelevant for a .NET 8 project.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed