Your first function in C#
Create a function app in C# with the isolated worker model, look at what each generated file does, and run an HTTP function on your own computer before anything goes to Azure.
- Azure Functions hostWatches triggers, scales, routes events. Managed by Azure.
- gRPC channelPasses each event to your worker and the result back.
- Your .NET worker processProgram.cs, dependency injection, middleware, your .NET version.
- Your functionsMethods with [Function] and a trigger attribute.
The isolated worker keeps your code in its own process, so the host and your app do not share dependencies.
Create the project
You need the .NET SDK and Azure Functions Core Tools (the func command). Visual Studio and VS Code can create the same project from their Azure Functions templates.
func init OrdersApp --worker-runtime dotnet-isolated
cd OrdersApp
func new --name Hello --template "HTTP trigger"
func start
# Functions:
# Hello: [GET,POST] http://localhost:7071/api/HelloThe isolated worker model
Your functions run in their own .NET process, separate from the Functions host. You pick the .NET version, use normal dependency injection and middleware, and are not tied to the host's dependencies.
The older in-process model loaded your code inside the host. Microsoft's support for it ends on 10 November 2026, so new apps always use the isolated worker model.
Program.cs
Program.cs builds the worker like an ASP.NET Core app. ConfigureFunctionsWebApplication turns on ASP.NET Core integration, so HTTP functions can use HttpRequest and IActionResult.
using Microsoft.Azure.Functions.Worker.Builder;
using Microsoft.Extensions.Hosting;
var builder = FunctionsApplication.CreateBuilder(args);
builder.ConfigureFunctionsWebApplication();
builder.Services.AddApplicationInsightsTelemetryWorkerService();
builder.Build().Run();The other files
- host.json: settings for the whole app, such as logging levels and extension options.
- local.settings.json: app settings for your machine only, such as AzureWebJobsStorage. Never commit it; it is in .gitignore by default.
- The .csproj references Microsoft.Azure.Functions.Worker and one extension package per trigger type you use, for example Worker.Extensions.Http.AspNetCore.
Run and call it
func start (or F5) starts the host on port 7071 and lists each function with its URL. Open http://localhost:7071/api/Hello?name=Asha in a browser, and the console shows the log lines from your function.
Interview question
What is the isolated worker model in Azure Functions?
In the isolated worker model the function code runs in its own .NET process, separate from the Functions host, and talks to it over gRPC. You choose the .NET version, control your dependencies, and use the normal .NET host builder with dependency injection and middleware. It replaces the in-process model, whose support ends in November 2026.
Want the full details? Read the official Microsoft documentation for this topic.