Skip to content

.NET Recipes

Implementation-focused patterns for .NET isolated worker Azure Functions.

Recipe Categories

flowchart TD
    A[HTTP] --> B[Storage]
    B --> C[Security]
    C --> D[Advanced]

HTTP

Recipe Description
HTTP API Patterns Route, request, response, and validation patterns.
HTTP Authentication Function keys, platform auth, and token validation.
OpenAPI and Swagger Auto-generating OpenAPI docs and Swagger UI with the isolated worker OpenAPI extension.

Storage

Recipe Description
Cosmos DB Input and output binding usage in isolated worker.
Blob Storage Blob trigger and blob output handling.
Queue Queue trigger, poison message, and output binding pattern.
Table Storage Table input and output binding usage in isolated worker.

Security

Recipe Description
Key Vault Secrets retrieval with managed identity.
Managed Identity Passwordless access patterns to Azure services.
Custom Domain and Certificates HTTPS endpoint hardening for function apps.

Advanced

Recipe Description
Timer Cron schedules and idempotent scheduled jobs.
Durable Orchestration Stateful workflows and fan-out/fan-in.
Durable Entities Stateful, addressable per-key state (actor-style) with serialized operations.
Durable Advanced Sub-orchestrations, eternal orchestrations, activity retries, and versioning.
Event Grid Event-driven integration patterns.
Event Hubs High-throughput event stream consumption with batch trigger and output binding.
Service Bus Enterprise messaging with queue/topic triggers, dead-lettering, and output binding.
SignalR Service Real-time messaging via the negotiate endpoint and output binding.
Dependency Injection Registering services and constructor injection in the isolated worker container.
Retry Policies Runtime retry policies (fixed delay, exponential backoff) for Timer, Event Hubs, and Cosmos DB triggers.
Middleware Cross-cutting behavior with the isolated worker IFunctionsWorkerMiddleware pipeline.
Unit Testing Host-free unit testing with xUnit, constructor injection, and Moq.
Migrate to Isolated Migrating a .NET in-process app to the isolated worker model before the in-process retirement.

See Also

Sources